Hustoj LiveCD版系统root、数据库root及oj管理员密码的修改

来源:互联网 发布:手机网络异常怎么办 编辑:程序博客网 时间:2024/06/10 01:22

一、安装Hustoj LiveCD

下载地址: https://code.google.com/p/hustoj/downloads/list

二、安装好后,开机进入系统

初始账户为root,密码为freeproblemset。安装过程中所设置的账户和密码无效。

三、进入系统

1、启动Firefox访问http://127.0.0.1/可进入OJ界面。(或者http://localhost/ 两者一样)端口号为80.  

2、运行ifconfig查得IP,其他电脑可通过网络访问。 

3、OJ管理员admin初始密码为admin. 

四、密码的修改

1、系统root密码的修改。

root权限下,终端输入 passwd root。 然后提示输入新密码,确认新 密码。OK

2、MySQL密码的修改

 

过程:

1、关闭mysql。

[root@localhost ~]#service mysql stop

Stopping MySQL:                                            [  OK  ]

2、跳过授权表启动mysql,关闭网络监听,让其后台运行或者开个新终端。

[root@localhost ~]#mysqld_safe --skip-grant-tables --skip-networking

Starting mysqld daemon with databases from /var/lib/mysql
提示:此时按下CTRL-Z

[1]+  Stopped                 mysqld_safe --skip-grant-tables --skip-networking

[root@localhost ~]#bg

[1]+ mysqld_safe --skip-grant-tables --skip-networking &

3、链接mysql服务器。

[root@localhost ~]#mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

4、使用mysql数据库。

mysql>use mysql;

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

5、设置root新密码。

mysql>update user set password=password('123') where user='root';

Query OK, 3 rows affected (0.01 sec)
Rows matched: 3  Changed: 3  Warnings: 0

6、退出mysql。

mysql>quit;

Bye

7、重启mysql.

或者参考博客:http://blog.sina.com.cn/s/blog_538f130c01016svy.html

3、配置文件的修改

修改db_info.inc.php文件,位置在:/var/www/JudgeOnline/include/

修改judge.conf文件,位置在: /home/judge/etc/

关于配置信息,可参考张老师的博客。 网址:http://blog.csdn.net/zhblue/article/details/7366194

4、OJ管理员密码的修改。

先用原始的密码登陆上去,然后点击左边的修改密码即可。

现在,你可以尝试用你自己所设置的密码登陆OJ了。大笑本人也是摸索了好几天,查找了不少资源才搞定的。 如有不对的地方,请高手指出。也请搭建过hustoj

的给出一点指导意见。

附:hustoj开源项目的网址:https://code.google.com/p/hustoj/