2013年12月30日 星期一

[研究] 4images 1.7.11 圖片藝廊 安裝(CentOS 6.5 x64)

[研究] 4images 1.7.11 圖片藝廊 快速安裝程式(CentOS 6.5 x64)

2013-12-30

# 4images_install_CentOS6.5x64.sh
#
# 4images - Image Gallery Management System 
# WebSite: http://www.4homepages.de/
# DEMO : http://demo.4homepages.de/?l=english
# Language Pack Forum: http://www.4homepages.de/forum/index.php?board=16.0
# Language Pack Chinese Forum : http://www.4homepages.de/forum/index.php?topic=1183.0
# Language Pack Chinese : http://www.tkjlamps.com/upload/taiwan.zip
# Install : http://www.4homepages.de/forum/index.php?topic=26862.0

if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then
/usr/sbin/setenforce 0
#echo "/usr/sbin/setenforce 0" >> /etc/rc.local
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@"   /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@"   /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled"   /etc/selinux/config  
fi

yum -y install mysql mysql-server httpd php php-mysql wget php-mbstring php-gd

sed -i -e "s@AddDefaultCharset UTF-8@#AddDefaultCharset UTF-8@"   /etc/httpd/conf/httpd.conf
sed -i -e "/AddDefaultCharset UTF-8/aAddDefaultCharset Big5"  /etc/httpd/conf/httpd.conf
grep  AddDefaultCharset  /etc/httpd/conf/httpd.conf

service iptables stop
chkconfig iptables off

chkconfig httpd on
service httpd restart

chkconfig mysqld on
service mysqld restart

wget http://www.4homepages.de/downloads/9f9f37589ae5/4images1.7.11.zip
wget http://www.tkjlamps.com/upload/taiwan.zip

unzip 4images1.7.11.zip -d /var/www/html
unzip taiwan.zip -d /var/www/html/4images/lang

#mysqladmin -u username -p create databasename
mysql -e "create database 4imagesdb"
mysql -e "show databases; "
#mysql -e "use 4imagesdb; show tables;"

mysql -e "grant all on 4imagesdb.* to 4imagesuser@localhost; "
#mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES  ON 4imagesdb.*  TO '4imagesuser'@'localhost' IDENTIFIED BY '4imagespassword';"
mysql -e "set password for 4imagesuser@localhost=password('4imagespassword'); "
mysql -e "flush privileges; "
mysql -e "use mysql;  select Host,User,Password from user; "

chmod a+w /var/www/html/4images

firefox http://localhost/4images &

(下圖) 這些值可以自己修改,但是上面快速安裝程式設定值要跟著變更
主機名稱:localhost
資料庫名稱:4imagesdb
資料庫使用者名稱:4imagesuser
資料庫密碼:4imagespassword
時區:UTC+8
管理員名稱:自己輸入喜歡的
管理員密碼:自己輸入喜歡的
管理員密碼(確認):自己輸入喜歡的







成功後修改寫入權限

chmod a-w /var/www/html/4images
chmod -R a+w /var/www/html/4images/data
chmod -R a+w /var/www/html/4images/templates

(完)

[研究] 4images 1.7.9 圖片藝廊 快速安裝程式(CentOS 5.5 x86)

沒有留言:

張貼留言