本文共 5303 字,大约阅读时间需要 17 分钟。
1 ifconfig
2 vi /etc/sysconfig/network-scripts/ifcfg-eth0 3 service network restart4 ping www.baidu.com5 mkdir /root/.ssh6 chmod 700 /root/.ssh7 cd /root/.ssh8 vi authorized_keys9 reboot10 vi /etc/selinux/config 11 reboot12 ifconfig13 init 014 ifconfig15 uanme -a16 uname 17 uname -a18 servcie stop iptables19 service iptable status20 service iptables status21 service iptables stop22 chkconfig iptables off23 cd /usr/local/src24 ll25 wget26 yum install wget27 yum install epe28 yum install epel29 ping www.baidu.com30 ping www.baidu.o31 ping www.baidu.com32 cd /usr/local/src33 ll34 yum install wget -y35 wget 36 wget 37 cd /usr/local/src/38 ll39 wget 40 wget 41 history42 043 init 044 history45 cd /usr/local/src46 yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make47 wget 48 wget 49 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz250 history51 wget 52 ll53 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz54 cp mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1 mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz55 ll56 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1 57 ll58 rm wget-log 59 ll60 wget 61 wget 62 ll63 init 0.一、mysql5.6安装64 cd /usr/local/src68 wget 71 tar zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz 72 mv mysql-5.6.35-linux-glibc2.5-x86_64 /usr/local/mysql73 cd /usr/local/mysql/75 mkdir -p /data/mysql76 useradd mysql77 ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql79 cp support-files/my-default.cnf /etc/my.cnf 80 vi /etc/my.cnf 81 cp support-files/mysql.server /etc/init.d/mysqld82 vi /etc/init.d/mysqld 83 chmod 755 /etc/init.d/mysqld 84 chkconfig --add mysqld85 chkconfig --list86 service mysqld start87 netstat -lnp88 ps aux |grep mysqld90 cd src二、apache2.4安装92 tar zxvf httpd-2.4.29.tar.gz 94 tar zxvf apr-1.6.3.tar.gz 96 tar jxvf apr-util-1.6.1.tar.bz2 97 cd apr-1.6.398 ./configure --prefix=/usr/local/apr99 yum install libtool -y100 ./configure --prefix=/usr/local/apr101 echo $?102 make && make install103 echo $?104 cd ..105 cd apr-util-1.6.1107 ./configure --prefix=/usr/local/apr-util108 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr109 echo $?110 make && make install111 yum install expat -y112 make && make install113 echo %?118 cd /usr/local/src119 cp -r apr-1.6.3 /usr/local/src/httpd-2.4.29/srclib/apr120 cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.29/srclib/apr-util121 cd httpd-2.4.29122 ./configure --with-included-apr --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most123 cd ..125 tar jxvf pcre-8.41.tar.bz2 126 cd pcre-8.41127 ./configure --prefix=/usr/local/pcre128 echo $?131 cd httpd-2.4.29134 yum install -y pcre-devel135 ./configure --with-included-apr --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most --with-pcre=/usr/local/pcre136 echo $?137 make 138 echo $?139 make install140 echo $?141 cd /usr/local/apache2.4/conf/142 vi httpd.conf ServerName localhost:80143 /usr/local/apache2.4/bin/apachectl start144 netstat -lnp145 service stop iptables146 service iptables stop147 service iptables disable148 chkconfig iptabes off149 chkconfig iptables off三、php安装158 wget 160 tar zxvf php-5.6.30.tar.gz 161 cd php-5.6.30165 cd ..166 wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz 167 tar zxvf libmcrypt-2.5.7.tar.gz 168 cd libmcrypt-2.5.7169 ./configure --prefix=/usr/local/libmcrypt170 make && make install171 echo $?174 cd php-5.6.30178 yum install epel*179 yum install -y libmcrypt-devel180 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif182 make184 make install186 cp php.ini-production /usr/local/php/etc/php.ini188 vi /usr/local/apache2.4/conf/httpd.conf1<Directory />AllowOverride noneRequire all granted</Directory>2AddType application/x-compress .ZAddType application/x-gzip .gz .tgzAddType application/x-httpd-php .php3 <IfModule dir_module>DirectoryIndex index.html index.php</IfModule>189 /usr/local/apache2.4/bin/apachectl -t
191 vi /usr/local/apache2.4/htdocs/1.php<?phpphpinfo();#该参数的含义是PHP的信息?>192 ls /usr/local/apache2.4/modules/libphp5.so 193 cd /usr/local/apache2.4/htdocs/195 chmod 755 index.html 199 /usr/local/apache2.4/bin/apachectl -M205 /usr/local/apache2.4/bin/apachectl restart若打不开测试页,就重启一下电脑。再开启HTTP服务/usr/local/apache2.4/bin/apachectl start转载于:https://blog.51cto.com/goldstar52/2115720