This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
hardware:cs2019:log [2020/07/02 02:30] Xinyu Wen create |
hardware:cs2019:log [2022/07/13 10:52] Xinyu Wen |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Log: 气候组服务器维护记录 ====== | ====== Log: 气候组服务器维护记录 ====== | ||
- | ===== 1. Installation | + | ===== 9. WordPress |
+ | 2022-July-13, | ||
+ | 有关 MySQL 的安装和配置如下: | ||
+ | |||
+ | 直接用apt安装MySQL | ||
+ | apt install mysql-server | ||
+ | | ||
+ | 进入MySQL命令行环境 | ||
+ | mysql -u root | ||
+ | CREATE DATABASE wordpress; 创建一个给wp用的数据库wordpress | ||
+ | CREATE USER wpuser IDENTIFIED BY ' | ||
+ | GRANT ALL ON wordpress.* TO wpuser; 给wpuser用户赋予完全读写wordpress数据库的权力 | ||
+ | FLUSH PRIVILEGES; 改动生效 | ||
+ | EXIT | ||
+ | |||
+ | 有关 PHP 的安装和配置如下: | ||
+ | |||
+ | 系统原本就有apache2和php,其它是需要安装的,否则wordpress会报错说:php没有安装mysql的扩展插件 | ||
+ | apt install apache2 \ | ||
+ | ghostscript \ | ||
+ | libapache2-mod-php \ | ||
+ | mysql-server \ | ||
+ | php \ | ||
+ | php-bcmath \ | ||
+ | php-curl \ | ||
+ | php-imagick \ | ||
+ | php-intl \ | ||
+ | php-json \ | ||
+ | php-mbstring \ | ||
+ | php-mysql \ | ||
+ | php-xml \ | ||
+ | php-zip | ||
+ | 此时务必重启一下计算机! | ||
+ | |||
+ | 有关 WordPress 的安装和配置: | ||
+ | |||
+ | cp wp-config-sample.php wp-config.php | ||
+ | | ||
+ | vi wp-config.php | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | chown -R www-data: | ||
+ | |||
+ | 打开浏览器,进入5分钟配置页面即可:http:// | ||
+ | | ||
+ | 日后访问网页:http:// | ||
+ | 日后登录后台:http:// | ||
+ | |||
+ | |||
+ | ===== 8. WebDAV service ===== | ||
+ | 2022-May-17, | ||
+ | |||
+ | | ||
+ | url: http:// | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | ===== 7. 重装NCL ===== | ||
+ | 2021年10月17日,未知原因原来的NCL6虚拟环境不能用了,进不了ncl,于是决定重装 | ||
+ | |||
+ | su - # | ||
+ | conda create -n NCL662 -c conda-forge ncl # | ||
+ | |||
+ | 至此已经完成安装,以后用如下命令即可进入或退出NCL环境 | ||
+ | conda activate NCL662 | ||
+ | conda deactivate | ||
+ | |||
+ | 老的NCL6环境,就删除吧 | ||
+ | conda env list # | ||
+ | conda env remove --name NCL6 | ||
+ | |||
+ | |||
+ | ===== 6. 断电后fsck硬盘 ===== | ||
+ | 2021年8月22日,来到办公室发现cs已经关机了,估计是大楼断电导致了cs硬关机,唉,很为启动盘捏一把汗。果然,启动cs后,一大堆错误,第一遍甚至没起来。按reset键重启,在经历一大堆硬盘报错后,进入到登录画面了。登录,切换root,感觉还是不太正常。决定用fsck命令检查启动盘的所有错误。命令如下: | ||
+ | |||
+ | < | ||
+ | df -T -h # 检查各个盘的dev名,和fs类型(是否ext4?) | ||
+ | fsck.ext4 | ||
+ | 或者 | ||
+ | fsck.ext4 -y / | ||
+ | </ | ||
+ | |||
+ | 之后再重启,就没有问题了!God bless me! | ||
+ | |||
+ | ===== 5. Banner ===== | ||
+ | < | ||
+ | ##### Generate banner at /etc/motd (XW: Mar 6, 2020) | ||
+ | www.patorjk.com/ | ||
+ | Input anything you want to show as hello banner | ||
+ | Press "Test All" so that you can choose one touching you | ||
+ | </ | ||
+ | |||
+ | ===== 4. NCL within conda ===== | ||
+ | 语真反映yum安装的NCL画图会出现莫名其妙的问题,再加上历史遗留的load问题,索性干脆按照官网指导,用conda重新安一个NCL和专门给它独享的环境。 | ||
+ | < | ||
+ | ##### Re-Install NCL through conda (XW: Feb 22, 2020) | ||
+ | follow this page: http:// | ||
+ | run this command to install NCL 6.6.2 into an environment named " | ||
+ | conda create -n NCL6 -c conda-forge ncl | ||
+ | |||
+ | Please note that everyone, for everytime, | ||
+ | should run "conda activate NCL6" right before using NCL. | ||
+ | |||
+ | "conda deactivate" | ||
+ | </ | ||
+ | |||
+ | ===== 3. Timezone ===== | ||
+ | 机器时区默认是错的,故手工修改一下时区信息 | ||
+ | < | ||
+ | ##### Reset Timezone | ||
+ | timedatectl set-timezone Asia/ | ||
+ | timedatectl (this command will show below outputs) | ||
+ | (base) root@cs:~# timedatectl | ||
+ | Local time: Mon 2019-11-04 14:45:17 CST | ||
+ | Universal time: Mon 2019-11-04 06:45:17 UTC | ||
+ | RTC time: Mon 2019-11-04 06:45:17 | ||
+ | Time zone: Asia/ | ||
+ | | ||
+ | systemd-timesyncd.service active: yes | ||
+ | RTC in local TZ: no | ||
+ | </ | ||
+ | |||
+ | ===== 2. Python ===== | ||
+ | < | ||
+ | ##### Python3 w/ Anaconda | ||
+ | Download Anaconda3-2019.10-Linux-x86_64.sh from tuna.tsinghua and install it | ||
+ | After installation, | ||
+ | ----- | ||
+ | installation finished. | ||
+ | Do you wish the installer to initialize Anaconda3 | ||
+ | by running conda init? [yes|no] | ||
+ | [no] >>> | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | no change | ||
+ | modified | ||
+ | |||
+ | ==> For changes to take effect, close and re-open your current shell. <== | ||
+ | |||
+ | If you'd prefer that conda' | ||
+ | set the auto_activate_base parameter to false: | ||
+ | |||
+ | conda config --set auto_activate_base false | ||
+ | |||
+ | Thank you for installing Anaconda3! | ||
+ | ----- | ||
+ | </ | ||
+ | |||
+ | 之后用conda装一个basemap,以方便慕琦使用python画地图 | ||
+ | < | ||
+ | ##### Install basemap package for anaconda/ | ||
+ | conda install basemap | ||
+ | </ | ||
+ | |||
+ | 此外,有些package用conda没法安装,使用pip做如下补充: | ||
+ | < | ||
+ | ##### pip install | ||
+ | pip install pygame | ||
+ | pip install nikola pelican | ||
+ | </ | ||
+ | |||
+ | ===== 1. Installation ===== | ||
< | < | ||
##### Tools | ##### Tools | ||
Line 38: | Line 212: | ||
##### Network | ##### Network | ||
+ | apt install aria2 tranmission-cli | ||
apt install firefox | apt install firefox | ||
apt install w3m | apt install w3m | ||
apt install apache2 | apt install apache2 | ||
- | a2enmod userdir | + | a2enmod userdir |
- | systemctl restart apache2 | + | systemctl restart apache2 |
apt install php | apt install php | ||
apt install shellinabox | apt install shellinabox | ||
service shellinabox status | service shellinabox status | ||
service shellinabox start | service shellinabox start | ||
- | vi / | + | vi / |
apt install vsftpd | apt install vsftpd | ||
systemctl status vsftpd | systemctl status vsftpd | ||
systemctl start vsftpd | systemctl start vsftpd | ||
systemctl enable vsftpd | systemctl enable vsftpd | ||
- | |||
- | ##### Python3 w/ Anaconda | ||
- | Download Anaconda3-2019.10-Linux-x86_64.sh from tuna.tsinghua and install it | ||
- | After installation, | ||
- | ----- | ||
- | installation finished. | ||
- | Do you wish the installer to initialize Anaconda3 | ||
- | by running conda init? [yes|no] | ||
- | [no] >>> | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | no change | ||
- | modified | ||
- | |||
- | ==> For changes to take effect, close and re-open your current shell. <== | ||
- | |||
- | If you'd prefer that conda' | ||
- | set the auto_activate_base parameter to false: | ||
- | |||
- | conda config --set auto_activate_base false | ||
- | |||
- | Thank you for installing Anaconda3! | ||
- | ----- | ||
- | |||
- | ##### pip install | ||
- | pip install pygame | ||
- | pip install nikola pelican | ||
- | |||
- | ##### Reset Timezone | ||
- | timedatectl set-timezone Asia/ | ||
- | timedatectl (this command will show below outputs) | ||
- | (base) root@cs:~# timedatectl | ||
- | Local time: Mon 2019-11-04 14:45:17 CST | ||
- | Universal time: Mon 2019-11-04 06:45:17 UTC | ||
- | RTC time: Mon 2019-11-04 06:45:17 | ||
- | Time zone: Asia/ | ||
- | | ||
- | systemd-timesyncd.service active: yes | ||
- | RTC in local TZ: no | ||
- | |||
- | ##### Re-Install NCL through conda (XW: Feb 22, 2020) | ||
- | follow this page: http:// | ||
- | run this command to install NCL 6.6.2 into an environment named " | ||
- | conda create -n NCL6 -c conda-forge ncl | ||
- | |||
- | Please note that everyone, for everytime, | ||
- | should run "conda activate NCL6" right before using NCL. | ||
- | |||
- | "conda deactivate" | ||
- | |||
- | ##### Install basemap package for anaconda/ | ||
- | conda install basemap | ||
- | |||
- | ##### Generate banner at /etc/motd (XW: Mar 6, 2020) | ||
- | www.patorjk.com/ | ||
- | Input anything you want to show as hello banner | ||
- | Press "Test All" so that you can choose one touching you | ||
</ | </ | ||
Line 126: | Line 236: | ||
* 20 Processors (Intel Xeon CPU E5-2650L v2 @ 1.70 GHz) | * 20 Processors (Intel Xeon CPU E5-2650L v2 @ 1.70 GHz) | ||
* 64G RAM (Samsung DDR3 1600 MHz) | * 64G RAM (Samsung DDR3 1600 MHz) | ||
- | * Hard drive: 2 x 12T HHD (WD Red) + 1 x 500G SSD | + | * Hard drive: 2 x 12T HHD (WD Red) + 1 x 480G SSD |