system-config-network-tui
service network restart
vim /etc/hosts
配置第三方仓库
1、安装 release.rpm 并导入仓库公钥
1234567
cd ; mkdir RPM ; cd RPM
wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-7.noarch.rpm
wget http://mirrors.sohu.com/dag/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ivh epel-release-6-7.noarch.rpm
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
2、配置仓库优先级
[base]、[updates]、[extras]
priority=1
[centosplus]、[contrib]
priority=2
[epel]
priority=10
[rpmforge]
priority=15
3、配置使用非官方仓库的国内镜像站点
(1) EPEL
12345
cd /etc/yum.repos.d/
cp epel.repo{,.orig}sed -i "s/^mirrorlist/#mirrorlist/g" epel.repo
sed -i "s/^#baseurl/baseurl/g" epel.repo
sed -i "s#download.fedoraproject.org/pub/epel#mirrors.sohu.com/fedora-epel#g" epel.repo
# cd /etc/yum.repos.d/# cp CentOS-Base.repo{,.orig}# sed -i "s/mirror.centos.org/mirrors.163.com/g" CentOS-Base.repo# sed -i "s/^mirrorlist/#mirrorlist/g" CentOS-Base.repo# sed -i "s/^#baseurl/baseurl/g" CentOS-Base.repo
# cd /etc/yum.repos.d/# cp epel.repo{,.orig}# sed -i "s/^mirrorlist/#mirrorlist/g" epel.repo# sed -i "s/^#baseurl/baseurl/g" epel.repo# sed -i "s#download.fedoraproject.org/pub/epel#mirrors.sohu.com/fedora-epel#g" epel.repo
2、RPMForge
1234
# cd /etc/yum.repos.d/# cp rpmforge.repo{,.orig}# sed -i "s#baseurl = http://apt.sw.be#baseurl = http://mirrors.sohu.com/dag#g" rpmforge.repo# yum makecache
server{listen80;server_namepma.domain.com;access_log/var/log/nginx/phpmyadmin/access.log;error_log/var/log/nginx/phpmyadmin/error.log;root/usr/share/phpMyAdmin;location/{indexindex.php;}## Images and static content is treated differentlocation~*^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {access_logoff;expires360d;}location~/\.ht{denyall;}location~/(libraries|setup/frames|setup/libs){denyall;return404;}location~\.php${include/etc/nginx/fastcgi_params;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME/usr/share/phpMyAdmin$fastcgi_script_name;}}
123456789101112131415
### 检查配置文件语法的正确性# nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open()"/var/log/nginx/phpmyadmin/access.log" failed (2: No such file or directory)nginx: configuration file /etc/nginx/nginx.conf test failed
### 为分离的日志创建存放目录# mkdir /var/log/nginx/phpmyadmin/ ### 重新检查配置文件语法的正确性# nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
### 重启 Nginx# service nginx restart### 配置 pma.domain.com 的域名解析后### 使用浏览器访问 http://pma.domain.com 测试
配置防火墙
123
# system-config-firewall-tui## 开启 80 端口。
或编辑 /etc/sysconfig/iptables 开启 80 端口。
1
# vim /etc/sysconfig/iptables
1234567891011121314
# Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filter
:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
123
# vim /etc/sysconfig/iptables-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
$ rake install
rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2.
Using bundle exec may solve this.
(See full trace by running task with --trace)
# ----------------------- ## Main Configs ## ----------------------- #url:# For rewriting urls for RSS, etctitle:# Used in the header and title tagssubtitle:# A description used in the headerauthor:# Your name, for RSS, Copyright, Metadatasimple_search:# Search engine for simple site searchdescription:# A default meta description for your sitesubscribe_rss:# Url for your blog's feed, defauts to /atom.xmlsubscribe_email:# Url to subscribe by email (service required)email:# Email address for the RSS feed if you want it.
$ rake -T
rake clean # Clean out caches: .pygments-cache, .gist-c...rake copydot[source,dest]# copy dot files for deploymentrake deploy # Default deploy taskrake gen_deploy # Generate website and deployrake generate # Generate jekyll siterake install[theme]# Initial setup for Octopress: copies the de...rake integrate # Move all stashed posts back into the posts...rake isolate[filename]# Move all other posts than the one currentl...rake list # list tasksrake new_page[filename]# Create a new page in source/(filename)/ind...rake new_post[title]# Begin a new post in source/_postsrake preview # preview the site in a web browserrake push # deploy public directory to github pagesrake rsync # Deploy website via rsyncrake set_root_dir[dir]# Update configurations to support publishin...rake setup_github_pages[repo]# Set up _deploy folder and deploy branch fo...rake update_source[theme]# Move source to source.old, install source ...rake update_style[theme]# Move sass to sass.old, install sass theme ...rake watch # Watch the site and regenerate when it changes