博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
lamp架构之centos6+apache2.4+.mysql5.6+php5.6.30
阅读量:6913 次
发布时间:2019-06-27

本文共 5303 字,大约阅读时间需要 17 分钟。

1 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
36 wget
37 cd /usr/local/src/
38 ll
39 wget
40 wget
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
48 wget
49 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
50 history
51 wget
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
61 wget
62 ll
63 init 0
.一、mysql5.6安装
64 cd /usr/local/src
68 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/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
ServerName localhost:80
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
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
188 vi /usr/local/apache2.4/conf/httpd.conf
1<Directory />
AllowOverride none
Require all granted
</Directory>
2AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
3 <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
<?php
phpinfo();
#该参数的含义是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 -M
205 /usr/local/apache2.4/bin/apachectl restart
若打不开测试页,就重启一下电脑。再开启HTTP服务
/usr/local/apache2.4/bin/apachectl start

转载于:https://blog.51cto.com/goldstar52/2115720

你可能感兴趣的文章
Ignoring query to other database
查看>>
Centos6.4安装OTRS必须成功版!
查看>>
List,ArrayList,Map循环遍历
查看>>
我的友情链接
查看>>
objectclass and objectcategory
查看>>
常用模块自动化安装脚本
查看>>
我的友情链接
查看>>
SQL Server数据库优化方案
查看>>
Redis基础教程第2节 Redis和NoSql 介绍与应用场景
查看>>
vmstat
查看>>
Word 2003操作技巧之改变默认字体及恢复方法
查看>>
redux-form(V7.4.2)笔记(三)之Flow简介
查看>>
Asp.Net 网站优化 数据库优化措施 使用主从库(上)
查看>>
华为存储行吗?!始终保持一种学习的心态
查看>>
wxPython StyledTextCtrl events
查看>>
Docker
查看>>
Linux命令行测试网速
查看>>
绍兴市×××局虚拟化容灾设备项目<100万
查看>>
Android JSON And Object Cast
查看>>
程序设计专业问与答
查看>>