lamp架構之centos6+apache2.4+.mysql5.6+php5.6.30
阿新 • • 發佈:2018-05-13
lamp1 ifconfig
2 vi /etc/sysconfig/network-scripts/ifcfg-eth0
3 service network restart
4 ping www.baidu.com
5 mkdir /root/.ssh
6 chmod 700 /root/.ssh
7 cd /root/.ssh
8 vi authorized_keys
9 reboot
10 vi /etc/selinux/config
11 reboot
12 ifconfig
13 init 0
14 ifconfig
15 uanme -a
16 uname
17 uname -a
18 servcie stop iptables
19 service iptable status
20 service iptables status
21 service iptables stop
22 chkconfig iptables off
23 cd /usr/local/src
24 ll
25 wget
26 yum install wget
27 yum install epe
28 yum install epel
29 ping www.baidu.com
30 ping www.baidu.o
31 ping www.baidu.com
32 cd /usr/local/src
33 ll
34 yum install wget -y
35 wget http://mirrors.sohu.com/apache/httpd-2.4.29.tar.gz
36 wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
37 cd /usr/local/src/
38 ll
39 wget http://mirrors.sohu.com/php/php-5.6.9.tar.gz
40 wget http://mirrors.sohu.com/nginx/nginx-1.9.3.tar.gz
41 history
42 0
43 init 0
44 history
45 cd /usr/local/src
46 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 make
47 wget https://netix.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gz
48 wget https://jaist.dl.sourceforge.net/project/pcre/pcre/8.41/pcre-8.41.tar.gz
49 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
50 history
51 wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
52 ll
53 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
54 cp mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1 mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
55 ll
56 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1
57 ll
58 rm wget-log
59 ll
60 wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz
61 wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2
62 ll
63 init 0
.一、mysql5.6安裝
64 cd /usr/local/src
68 wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
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/mysql
73 cd /usr/local/mysql/
75 mkdir -p /data/mysql
76 useradd mysql
77 ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
79 cp support-files/my-default.cnf /etc/my.cnf
80 vi /etc/my.cnf
81 cp support-files/mysql.server /etc/init.d/mysqld
82 vi /etc/init.d/mysqld
83 chmod 755 /etc/init.d/mysqld
84 chkconfig --add mysqld
85 chkconfig --list
86 service mysqld start
87 netstat -lnp
88 ps aux |grep mysqld
90 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.3
98 ./configure --prefix=/usr/local/apr
99 yum install libtool -y
100 ./configure --prefix=/usr/local/apr
101 echo $?
102 make && make install
103 echo $?
104 cd ..
105 cd apr-util-1.6.1
107 ./configure --prefix=/usr/local/apr-util
108 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
109 echo $?
110 make && make install
111 yum install expat -y
112 make && make install
113 echo %?
118 cd /usr/local/src
119 cp -r apr-1.6.3 /usr/local/src/httpd-2.4.29/srclib/apr
120 cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.29/srclib/apr-util
121 cd httpd-2.4.29
122 ./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
123 cd ..
125 tar jxvf pcre-8.41.tar.bz2
126 cd pcre-8.41
127 ./configure --prefix=/usr/local/pcre
128 echo $?
131 cd httpd-2.4.29
134 yum install -y pcre-devel
135 ./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/pcre
136 echo $?
137 make
138 echo $?
139 make install
140 echo $?
141 cd /usr/local/apache2.4/conf/
142 vi httpd.conf
143 /usr/local/apache2.4/bin/apachectl start
144 netstat -lnp
145 service stop iptables
146 service iptables stop
147 service iptables disable
148 chkconfig iptabes off
149 chkconfig iptables off
三、php安裝
158 wget http://mirrors.sohu.com/php/php-5.6.30.tar.gz
160 tar zxvf php-5.6.30.tar.gz
161 cd php-5.6.30
165 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.7
169 ./configure --prefix=/usr/local/libmcrypt
170 make && make install
171 echo $?
174 cd php-5.6.30
178 yum install epel*
179 yum install -y libmcrypt-devel
180 ./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-exif
182 make
184 make install
186 cp php.ini-production /usr/local/php/etc/php.ini
187 /usr/local/apache2.4/bin/apachectl -M
188 vi /usr/local/apache2.4/conf/httpd.conf
189 /usr/local/apache2.4/bin/apachectl -t
191 vi /usr/local/apache2.4/htdocs/1.php
192 ls /usr/local/apache2.4/modules/libphp5.so
193 cd /usr/local/apache2.4/htdocs/
195 chmod 755 index.html
197 vi /usr/local/apache2.4/conf/httpd.conf
199 /usr/local/apache2.4/bin/apachectl -M
205 /usr/local/apache2.4/bin/apachectl restart
2 vi /etc/sysconfig/network-scripts/ifcfg-eth0
3 service network restart
4 ping www.baidu.com
5 mkdir /root/.ssh
6 chmod 700 /root/.ssh
7 cd /root/.ssh
8 vi authorized_keys
9 reboot
10 vi /etc/selinux/config
11 reboot
12 ifconfig
13 init 0
14 ifconfig
15 uanme -a
16 uname
17 uname -a
18 servcie stop iptables
20 service iptables status
21 service iptables stop
22 chkconfig iptables off
23 cd /usr/local/src
24 ll
25 wget
26 yum install wget
27 yum install epe
28 yum install epel
29 ping www.baidu.com
30 ping www.baidu.o
31 ping www.baidu.com
32 cd /usr/local/src
33 ll
34 yum install wget -y
36 wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
37 cd /usr/local/src/
38 ll
39 wget http://mirrors.sohu.com/php/php-5.6.9.tar.gz
40 wget http://mirrors.sohu.com/nginx/nginx-1.9.3.tar.gz
41 history
42 0
43 init 0
44 history
46 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 make
47 wget https://netix.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gz
48 wget https://jaist.dl.sourceforge.net/project/pcre/pcre/8.41/pcre-8.41.tar.gz
49 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
50 history
51 wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
52 ll
53 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
54 cp mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1 mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
55 ll
56 rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1
57 ll
58 rm wget-log
59 ll
60 wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz
61 wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2
62 ll
63 init 0
.一、mysql5.6安裝
64 cd /usr/local/src
68 wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
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/mysql
73 cd /usr/local/mysql/
75 mkdir -p /data/mysql
76 useradd mysql
77 ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
79 cp support-files/my-default.cnf /etc/my.cnf
80 vi /etc/my.cnf
81 cp support-files/mysql.server /etc/init.d/mysqld
82 vi /etc/init.d/mysqld
83 chmod 755 /etc/init.d/mysqld
84 chkconfig --add mysqld
85 chkconfig --list
86 service mysqld start
87 netstat -lnp
88 ps aux |grep mysqld
90 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.3
98 ./configure --prefix=/usr/local/apr
99 yum install libtool -y
100 ./configure --prefix=/usr/local/apr
101 echo $?
102 make && make install
103 echo $?
104 cd ..
105 cd apr-util-1.6.1
107 ./configure --prefix=/usr/local/apr-util
108 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
109 echo $?
110 make && make install
111 yum install expat -y
112 make && make install
113 echo %?
118 cd /usr/local/src
119 cp -r apr-1.6.3 /usr/local/src/httpd-2.4.29/srclib/apr
120 cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.29/srclib/apr-util
121 cd httpd-2.4.29
122 ./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
123 cd ..
125 tar jxvf pcre-8.41.tar.bz2
126 cd pcre-8.41
127 ./configure --prefix=/usr/local/pcre
128 echo $?
131 cd httpd-2.4.29
134 yum install -y pcre-devel
135 ./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/pcre
136 echo $?
137 make
138 echo $?
139 make install
140 echo $?
141 cd /usr/local/apache2.4/conf/
142 vi httpd.conf
143 /usr/local/apache2.4/bin/apachectl start
144 netstat -lnp
145 service stop iptables
146 service iptables stop
147 service iptables disable
148 chkconfig iptabes off
149 chkconfig iptables off
三、php安裝
158 wget http://mirrors.sohu.com/php/php-5.6.30.tar.gz
160 tar zxvf php-5.6.30.tar.gz
161 cd php-5.6.30
165 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.7
169 ./configure --prefix=/usr/local/libmcrypt
170 make && make install
171 echo $?
174 cd php-5.6.30
178 yum install epel*
179 yum install -y libmcrypt-devel
180 ./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-exif
182 make
184 make install
186 cp php.ini-production /usr/local/php/etc/php.ini
187 /usr/local/apache2.4/bin/apachectl -M
188 vi /usr/local/apache2.4/conf/httpd.conf
189 /usr/local/apache2.4/bin/apachectl -t
191 vi /usr/local/apache2.4/htdocs/1.php
192 ls /usr/local/apache2.4/modules/libphp5.so
193 cd /usr/local/apache2.4/htdocs/
195 chmod 755 index.html
197 vi /usr/local/apache2.4/conf/httpd.conf
199 /usr/local/apache2.4/bin/apachectl -M
205 /usr/local/apache2.4/bin/apachectl restart
lamp架構之centos6+apache2.4+.mysql5.6+php5.6.30