安裝Mysql
# yum -y install mysql-server
# mysqladmin -u root password 'your password'
安裝 php
# yum -y install php php-mysql php-gd php-mbstring
# vi /etc/php.ini <= 自行修改您要的值,內容參考如下
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 80M
upload_max_filesize = 20M
安裝 phpMyAdmin
# cd /var/www/html
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/2.11.11/phpMyAdmin-2.11.11-all-languages.tar.gz/download
# tar -zxvf phpMyAdmin-XXX.tar.gz
# mv phpMyAdmin-XXX phpMyAdmin
# cp /var/www/html/phpMyAdmin/libraries/config.default.php /var/www/html/phpMyAdmin/config.inc.php
# vi /var/www/html/phpMyAdmin/config.inc.php
$cfg['PmaAbsoluteUri'] = ''
改成 $cfg['PmaAbsoluteUri'] = 'http://ip/phpMyAdmin/';
$cfg['Servers'][$i]['auth_type'] = 'config'
改成 $cfg['Servers'][$i]['auth_type'] = 'http';
PS .開啟 phpMyAdmin 的首頁時, 出現"php 5.2+ is required"表示你裝phpMyAdmin版本要用到php5.2以上的版本
# chkconfig --level 2345 httpd on
讓tomcat開機時啟動
# touch /etc/init.d/tomcat
# chmod 755 /etc/init.d/tomcat
# vi /etc/init.d/tomcat
內容如下
#!/bin/bash
# process init file for tomcat
#
# chkconfig: 2345 90 80
# description: Apache Tomcat Daemon
#
# processname: /usr/local/tomcat/bin/startup.sh and /usr/local/tomcatbin/shutdown.sh
start() {
echo -n "Starting up Tomcat: ";echo "";
/usr/local/tomcat/bin/startup.sh
}
stop() {
echo -n "Shutting down Tomcat: ";echo "";
/usr/local/bin/shutdown.sh
}
restart() {
echo "Restarting Tomcat:"
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: Tomcat {start|stop|restart}"
exit 1
esac
測試一下啟動,停止 tomcat
# service tomcat start
# service tomcat stop
確認process有跑嗎
# ps -ef|grep tomcat
確認目前有tomcat這個服務在跑嗎?應該沒有才對喔!
# chkconfig --list|grep tomcat
加進來
# chkconfig --add tomcat
確認
# chkconfig --list|grep tomcat
tomcat 0:off 1:off 2:on 3:on 4:on 5:on 6:off
列出 /etc/rc.d/rcx.d/ 底下關於 tomcat 的部分
# find /etc/rc.d/ | grep 'tomcat'|sort
改httpd的port
# vi /etc/httpd/conf
Listen 8000
訂閱:
張貼留言 (Atom)
AI 時代的影響(2026-10-24的心得)
寫了半個世紀程式、 曾出版《Clean Code》教全世界工程師把程式碼寫乾淨的 Robert C. Martin(Uncle Bob), 最近公開表示他已經有超過 95% 的時間不再逐行閱讀 AI 寫的程式碼。 一位一生都在強調「程式碼是寫給人讀的」宗師級人物,何以敢做出...
-
這次專案是對既有的DB資料來開發系統,用到 Mybatis的 generator 和 dynamic sql 產生mapper及sql語法(不用寫任何的xml及欄位對應) 其中selectByExample 是對所有欄位都取出,但條件是依照web UI所輸入的欄位動態產生whe...
-
Env. restriction : request and response are both JSON format . Version of Jmeter is higher and equal to 2.6 1. Add new test plan 2. ...
-
因為使用alpine的base image,要讓OS的時區改成自己設定就需要額外安裝tzdata套件,再加上公司環境根本不能連外進行安裝,所以想在docker file設定 ENV TZ=“Asia/Taipei” 或mount volumn使用host的時區 /etc/tim...
沒有留言:
張貼留言