Building Ethereum environment with Ubuntu
Publish: 2021-04-23 15:10:56
1. Although it's not easy to build nginx + PHP environment on FreeBSD, e to the problem of using history, there are still many articles about this aspect of experience on the Internet. With the graal promotion of Ubuntu, it's necessary to study how to build nginx + PHP environment under Ubuntu, which is convenient for friends with this demand, and can promote the popularity of Ubuntu, It's much faster to build nginx + PHP environment in Ubuntu than in FreeBSD, because I use ports to install in FreeBSD and need to compile. It's very fast to install in the way of apt get install in Ubuntu. Let's start the installation! 1. Install nginx, execute the following command, and it will be completed quickly. However, at present, the default installation in APG get mode is 0; index index$fastcgi_ script_ name; include /etc/nginx/fastcgi_ params;}} 2. Install the PHP CGI mole and execute sudo apt get install PHP5 CGI configuration file. The default installation location is PHP CGI / usr / bin / PHP cgiphp5 CGI / usr / bin / PHP5 cgicgi config / usr / bin / CGI / php.ini. Modify the cgi.fix of php.ini file_ Pathinfo data is 1, default is 0 cgi.fix_ pathinfo=1; So PHP CGI can use script normally_ The variable 3 of file name, install splash fcgi. Splash fcgi is a tool used to control PHP CGI in lighttpd. If the system does not install GCC compilation environment, you need to install build essential toolkit just before installing lighttpd, Execute the following command sudo apt get install build essentialwget / download / lighttpd-1.4.19.tar.gztar - xvf lighttpd-1.4.19.tar.gzcd lighttpd-1.4.19/sudo apt get install libpcre3 dev. / configure & ndash; without-zlib – Without bzip2makesdo CP Src / spawn fcgi / usr / local / bin / spawn fcgi, the CGI controller will be installed. 4. Start the test system_ cgi:spawn-fcgi -a 127.0.0.1 - P 9000 - C 5 - U www data - G www data - F / usr / bin / PHP CGI note: IP, port should correspond to CGI pass in nginx server. - C means to open several CGI processes and start nginxsudo / etc / init.d/nginx start. If there is no error message, it means the configuration is successful. Now write a phpinfo test! Finally, I attach my / etc / nginx / sites enable / default configuration file, which enables the rewrite function server {listen 80; server_ name localhost; access_ log /var/log/nginx/localhost.access.log; location / {root /var/www/nginx-default; index index.php; if (-f $request_ filename/index.html){rewrite (.*) $1/index.html break;} if (-f $request_ filename/index.php){rewrite (.*) $1/index.php;} if (!- f $request_ filename){rewrite (.*) /index.php;}} # error_ page 404 /404.html;# redirect server error pages to the static page /50x.html#error_ page 500 502 503 504 /50x.html; location = /50x.html {root /var/www/nginx-default;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ .php$ {#proxy_ pass 127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ .php$ {fastcgi_ pass 127.0.0.1:9000; fastcgi_ index index.php; fastcgi_ param SCRIPT_ FILENAME /var/www/nginx-default$fastcgi_ script_ name; include /etc/nginx/fastcgi_ params;}# deny access to .htaccess files, if Apache’ s document root# concurs with nginx’ s one##location ~ /.ht {#deny all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#listen 8000;# listen somename:8080;# server_ name somename alias another.alias;# location / {#root html;# index index.html index.htm;#}#}# HTTPS server##server {#listen 443;# server_ name localhost;# ssl on;# ssl_ certificate cert.pem;# ssl_ certificate_ key cert.key;# ssl_ session_ timeout 5m;# ssl_ protocols SSLv2 SSLv3 TLSv1;# ssl_ ciphers ALL:! ADH:! EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;# ssl_ prefer_ server_ ciphers on;# location / {#root html;# index index.html index.htm;#}#} What about? Is it fast and convenient? Try it. If you want to be a WordPress friend, you can try it. Nginx + PHP is more efficient than Apache + PHP!
2. The steps are as follows: 1. Preparation:
1. Download and install vmware workstation
2. Download an Ubuntu system image
2. Create a new virtual machine:
1. Open VMware and create a new virtual machine. Search
2. Select "typical (recommended) (T)" and click "next"
3. Select "install operating system later" and click "next"
4. Select the Ubuntu system version and click next
5. Set "virtual machine name" and "location" of virtual machine, and click "next"
6. Set "maximum disk size", select "store virtual disk as a single file", and click "next"
3. Installation:
1. Load the image file of Ubuntu system downloaded in the first step on CD / DVD
2. Click the power button of the virtual machine, and then follow the steps to install it. After that, you can use the virtual machine.
1. Download and install vmware workstation
2. Download an Ubuntu system image
2. Create a new virtual machine:
1. Open VMware and create a new virtual machine. Search
2. Select "typical (recommended) (T)" and click "next"
3. Select "install operating system later" and click "next"
4. Select the Ubuntu system version and click next
5. Set "virtual machine name" and "location" of virtual machine, and click "next"
6. Set "maximum disk size", select "store virtual disk as a single file", and click "next"
3. Installation:
1. Load the image file of Ubuntu system downloaded in the first step on CD / DVD
2. Click the power button of the virtual machine, and then follow the steps to install it. After that, you can use the virtual machine.
3. Ubuntu has rich software sources, plus Google and other official support, so many people use it
but I use OS X as the development environment. If I need Linux, I will use Debian instead of Ubuntu.
but I use OS X as the development environment. If I need Linux, I will use Debian instead of Ubuntu.
4. There are many ways, methods and software to develop MCU under Ubuntu
if it is 51 MCU, it is good to use Sdcc
the software for burning chips is related to the specific chips used, and many of them can be found on the Internet. For example, even STC89C51 / 52, which is the most commonly used by domestic college students, can be written in Ubuntu using a software called gstcisp.
if it is 51 MCU, it is good to use Sdcc
the software for burning chips is related to the specific chips used, and many of them can be found on the Internet. For example, even STC89C51 / 52, which is the most commonly used by domestic college students, can be written in Ubuntu using a software called gstcisp.
5. The support of Ubuntu is really good. I tried openSUSE, Debian, CentOS, Fedora and Ubuntu when I installed Linux + windows al system on my laptop bare metal machine. Except for Ubuntu and Debian, other distributions will proce kernel panic after running for a period of time. The specific reason is unknown. It seems that there is a hard disk problem, and Debian reported an error directly ring the installation process, Only Ubuntu made it to the end
for Android, Google recommends using Ubuntu. You can see the relevant instructions on Google's official Android Developer website. Google also tests its Linux development environment under Ubuntu, so of course it should use Ubuntu. With the support of Google, it is difficult for Ubuntu to develop
as for why openwrt uses Ubuntu, it's still convenient. RedHat is really no match for novices. A lot of things that can be done by Ubuntu's next command, you need to look up a bunch of data and a bunch of documents in RedHat to know how to achieve it.
for Android, Google recommends using Ubuntu. You can see the relevant instructions on Google's official Android Developer website. Google also tests its Linux development environment under Ubuntu, so of course it should use Ubuntu. With the support of Google, it is difficult for Ubuntu to develop
as for why openwrt uses Ubuntu, it's still convenient. RedHat is really no match for novices. A lot of things that can be done by Ubuntu's next command, you need to look up a bunch of data and a bunch of documents in RedHat to know how to achieve it.
6. 1.安装交叉编译环境 sudo apt-get install gcc g++ libcc1 libg++ make gdb
2.安装交叉编译器 f
tp:
//ftp.
arm.linux.org.uk/pub/armlinux/toolchain/ 下载 cross -3.2.tar.bz2或者懒得去找干脆
wget f
tp://ftp.
arm.linux.org.uk/pub/armlinux/toolchain/ cross -3.2.tar.bz2
解压
sudo tar jxvf /home/zhaifang/cross -3.2.tar.bz2
sudo mv /home/zhaifang/usr/local/arm /usr/local
3.交叉编译器加入路径 sudo vi /etc/bash.bashrc后面加入
if [ -d /usr/local/arm ] ; then
PATH=/usr/local/arm/bin:'${PATH}'
fi
4.使环境生效 #source /etc/profile
5.检查 echo $PATH 出现/usr/local/arm/bin说明成功了
6.测试 arm-linux-gcc -v
2.安装交叉编译器 f
tp:
//ftp.
arm.linux.org.uk/pub/armlinux/toolchain/ 下载 cross -3.2.tar.bz2或者懒得去找干脆
wget f
tp://ftp.
arm.linux.org.uk/pub/armlinux/toolchain/ cross -3.2.tar.bz2
解压
sudo tar jxvf /home/zhaifang/cross -3.2.tar.bz2
sudo mv /home/zhaifang/usr/local/arm /usr/local
3.交叉编译器加入路径 sudo vi /etc/bash.bashrc后面加入
if [ -d /usr/local/arm ] ; then
PATH=/usr/local/arm/bin:'${PATH}'
fi
4.使环境生效 #source /etc/profile
5.检查 echo $PATH 出现/usr/local/arm/bin说明成功了
6.测试 arm-linux-gcc -v
7. 2、解压和配置go环境
$ tar xvf go1.6.linux-amd64.tar.gz11
会生成一个Go目录
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local/1212
设置环境变量
$ sudo vim /etc/profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/work
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
$ sudo source /etc/profile1234512345
3、测试 go 环境
$ tar xvf go1.6.linux-amd64.tar.gz11
会生成一个Go目录
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local/1212
设置环境变量
$ sudo vim /etc/profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/work
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
$ sudo source /etc/profile1234512345
3、测试 go 环境
8. By default, GCC command line compilation, combined with makefile and your favorite editor, is done.
9. Only JDK and Android SDK
Hot content
