In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Install VMware
two。 Install CentOS6.5
3. Configure network a. Modify the / etc/sysconfig/network-scripts/ifcfg-eth0 configuration file by adding the following DEVICE=eth0 HWADDR=00:0C:29:96:01:6B TYPE=Ethernet UUID=41cbd943-024b-4341-ac7a-e4d2142b4938 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=xxx.xxx.x.xxx # for example: IPADDR=192.168.2.140 NETMASK=255.255.255.0 GATEWAY=192.168.2.2b. Modify the / etc/resolv.conf configuration file and add the following content: nameserver 192.168.2.2c.service network restartd.ifconfige.ping www.baidu.com, if it can be pieced together, it means you can connect to the external network.
4. Modify the Yum source to Aliyun yum source a. Back up the original source mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.backupb. Download the new CentOS-Base.repo to / etc/yum.repos.d/ under CentOS 5 wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo or curl-o / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget-O / etc/yum .repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo or curl-o / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7 wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo or curl-o / etc/yum.repos .d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoc. Run the yum makecache command to generate the cache
5. Install the compilation environment yum-y install gcc openssl-devel pcre-devel zlib-devel
6. Install Tenginea. Download or upload tengine-2.1.0.tar.gz to / opt ls / opt cd / optb. Decompress tar-zxvf tengine-2.1.1.tar.gz ls cd tengine-2.1.0 lsc. Check the dependency. / configure\-- prefix=/opt/sxt/soft/tengine-2.1.0/\-- error-log-path=/var/log/nginx/error.log\-- http-log-path=/var/log/nginx/access.log\-- pid-path=/var/run/nginx/nginx.pid\-- lock-path=/var/lock/nginx.lock\-- with-http _ ssl_module\-with-http_flv_module\-with-http_stub_status_module\-with-http_gzip_static_module\-http-client-body-temp-path=/var/tmp/nginx/client/\-http-proxy-temp-path=/var/tmp/nginx/proxy/\-http-fastcgi-temp-path=/var/tmp/nginx/fcgi/\ -http-uwsgi-temp-path=/var/tmp/nginx/uwsgi\-http-scgi-temp-path=/var/tmp/nginx/scgi\-with-pcre d. Compile and install make & & make install
7. The installation is added to the startup file a. Create the nginx file under / etc/init.d, as follows: #! / bin/bash # # chkconfig:-85 15 # description: nginx is a World Wide Web server. It is used to serve # Source function library. . / etc/rc.d/init.d/functions # Source networking configuration. . / etc/sysconfig/network # Check that networking is up. ["$NETWORKING" = "no"] & & exit 0 nginx= "/ usr/tengine-2.1/sbin/nginx" prog=$ (basename $nginx) NGINX_CONF_FILE= "/ usr/tengine-2.1/conf/nginx.conf" # [- f / etc/sysconfig/nginx] & &. / etc/sysconfig/nginx lockfile=/var/lock/subsys/nginx # make_dirs () {# make required directories # user= `nginx-V 2 > & 1 | grep "configure arguments:" | sed's / [^ *] *-- user=\ ([^] *\). * /\ 1 / G'- `# options=` $nginx-V 2 > & 1 | grep 'configure arguments:' `# for opt in $options Do # if [`echo $opt | grep'. *-temp-path' `]; then # value= `echo $opt | cut-d "="-f 2` # if [!-d "$value"] Then # # echo "creating" $value # mkdir-p $value & & chown-R $user $value # fi # fi # done #} start () {[- x $nginx] | | exit 5 [- f $NGINX_CONF_FILE] | | exit 6 # make_dirs echo-n $"Starting $prog:" daemon $nginx-c $NGINX_CONF_FILE retval=$? Echo [$retval-eq 0] & & touch $lockfile return $retval} stop () {echo-n $"Stopping $prog:" killproc $prog-QUIT retval=$? Echo [$retval-eq 0] & & rm-f $lockfile return $retval} restart () {configtest | | return $? Stop sleep 1 start} reload () {configtest | | return $? Echo-n $"Reloading $prog:" #-HUP is the nginx smooth restart parameter killproc $nginx-HUP RETVAL=$? Echo} force_reload () {restart} configtest () {$nginx-t-c $NGINX_CONF_FILE} rh_ Status () {status $prog} rh_status_q () {rh_status > / dev/null 2 > & 1} case "$1" in start) Rh_status_q & & exit 0 $1 ; stop) rh_status_q | | exit 0 $1;; restart | configtest) $1 Reload) rh_status_q | | exit 7 $1;; force-reload) force_reload Status) rh_status;; condrestart | try-restart) rh_status_q | | exit 0 *) echo $"Usage: $0 {start | stop | status | restart | condrestart | try-restart | reload | force-reload | configtest}" exit 2 esacb. Modify the nginx configuration file to change nginx= "/ usr/tengine-2.1/sbin/nginx" to nginx= "/ opt/sxt/soft/tengine-2.1.0/sbin/nginx" and NGINX_CONF_FILE= "/ usr/tengine-2.1/conf/nginx.conf" to NGINX_CONF_FILE= "/ opt/sxt/soft/tengine-2.1.0/conf/nginx.conf" to save exit: wqc. Add execution permission to nginx chmod 755 nginxd. Start the service service nginx starte. There will be an error in step d. You need to manually create the / var/tmp/nginx/client/ directory mkdir-p / var/tmp/nginx/client/ service nginx startf. Turn off Firewall service iptables stop
8. Access tengine http://192.168.2.140/ in a browser
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.