August 21, 2008
鼓勵此網誌:0
install java + tomcat + mysql install in lunix
1 cd /usr/local
2 chmod 777 j2sdk
3 ./j2sdk
4 vi ~/.bash_profile
5 新增一下 export 到 profile 中
export JAVA_HOME=/usr/local/j2sdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar
6 source ~/.bash_profile
7 java -version
8 mkdir /usr/local/jakarta
9 tar zxvf jakart-tomcat-5.0.16.tar.gz.tar -C /usr/local/jakarta
10 cd /usr/local/jakarta/bin
11 ./catalina.sh start
mysql install in lunix
http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
configure --prefix=/usr/local/mysql
[root@localhost mysql]# ./bin/mysqladmin -u root password 'new-password'
[root@localhost mysql]# bin/mysqld_safe --user=mysql &
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
[root@localhost mysql]# ./mysqladmin.-u.root.password.'new-password'.
[root@localhost bin]# mysqladmin.-u.root.password.'new-password'
[root@localhost bin]# mysqladmin -u
[root@localhost bin]# mysqladmin -u root
[root@localhost bin]# mysqladmin -u root password
mysqladmin: Too few arguments to change password
[root@localhost bin]# mysqladmin -u root password '123456'
[root@localhost bin]# mysqlshow -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
[root@localhost bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.51a-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select date();
mysql> select date()
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-21 12:13:54 |
+---------------------+
1 row in set (0.00 sec)
mysql>
1 cd /usr/local
2 chmod 777 j2sdk
3 ./j2sdk
4 vi ~/.bash_profile
5 新增一下 export 到 profile 中
export JAVA_HOME=/usr/local/j2sdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar
6 source ~/.bash_profile
7 java -version
8 mkdir /usr/local/jakarta
9 tar zxvf jakart-tomcat-5.0.16.tar.gz.tar -C /usr/local/jakarta
10 cd /usr/local/jakarta/bin
11 ./catalina.sh start
mysql install in lunix
http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
configure --prefix=/usr/local/mysql
[root@localhost mysql]# ./bin/mysqladmin -u root password 'new-password'
[root@localhost mysql]# bin/mysqld_safe --user=mysql &
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
[root@localhost mysql]# ./mysqladmin.-u.root.password.'new-password'.
[root@localhost bin]# mysqladmin.-u.root.password.'new-password'
[root@localhost bin]# mysqladmin -u
[root@localhost bin]# mysqladmin -u root
[root@localhost bin]# mysqladmin -u root password
mysqladmin: Too few arguments to change password
[root@localhost bin]# mysqladmin -u root password '123456'
[root@localhost bin]# mysqlshow -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
[root@localhost bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.51a-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select date();
mysql> select date()
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-21 12:13:54 |
+---------------------+
1 row in set (0.00 sec)
mysql>







































