工具Xshell,利用ssh访问远程主机。ssh管理服务器文件Filezilla
su和sudo的区别。Linux超级用户权限。
安装PHP扩展包
安装apache模块
192.168.0.104 本地主机IP地址
lamp环境配置
1.apache 配置目录/etc/apache2/
apache.conf
核心配置
mods-*** apache模块
sites-*** 虚拟主机
available可以使用的;enabled已启用的
2.mysql核心配置文件my.cnf 端口3306
3.PHP配置文件php.ini
apache虚拟主机配置
基于主机名
1.设置域名映射同一个IP,修改hosts文件
192.168.1.10 www.test1.com
192.168.1.10 www.test2.com
192.168.1.10 www.test3.com
2.建立虚拟主机存放网页的根目录
/www/test1/1.html
/www/test2/2.html
/www/test3/3.html
3.在httpd.conf中将附加配置文件httpd-vhosts.conf包含进来,接着在httpd-vhosts.conf中写入如下配置:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot /www/
</VirtualHost>
<VirtualHost *:80>
ServerName www.test1.com
DocumentRoot /www/test1/
<Directory "/www/test1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.test2.com
DocumentRoot /www/test2/
<Directory "/www/test2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.test3.com
DocumentRoot /www/test3/
<Directory "/www/test3">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
数据迁移
停止数据库服务
建立新路径,用户和权限与原数据目录一样
cp数据(不能用mv)
修改数据库配置文件,存储路径
ubuntu中安全服务apparmor修改
重启数据库
phpmyadmin安装
mysql远程访问remote access
LAMP集群
Nginx负载均衡、apache、mysql
著名的服务器集群TTC、TFS、BAE、SAE、GFS