====== Log: pkumet.live ====== ===== 7 Update Website and DNS ===== 2022年2月14日,续费阿里云网站和DNS域名,具体情况如下: * 阿里云ECS主机,¥256.2,延一年至2023-4-4 * 阿里云DNS域名(pkumet.live),¥66,延一年至2023-3-6 ===== 6 Update yum ===== yum update on June 21, 2020 yum update ===== 5 DokuWiki ===== 2020年6月21日,应物理学院个人主页大迁徙,我干脆装个dokuwiki,由于之前已装好php,这真是一次简单而愉快的经历! =================================== Install DokuWiki (as group website) AN EASY JOB June 21, 2020 at /var/www/html/group take a look at readme.xwen there =================================== 具体这个DokuWiki的维护,请参考[[/hardware/site/log|硬件与网站 之 本网站维护记录]] ===== 4 PHP & MediaWiki ===== 错误的尝试:用yum安装php: yum install php php-pdo ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: php x86_64 5.4.16-46.el7 base 1.4 M php-pdo x86_64 5.4.16-46.el7 base 99 k Installing for dependencies: libzip x86_64 0.10.1-8.el7 base 48 k php-cli x86_64 5.4.16-46.el7 base 2.7 M php-common x86_64 5.4.16-46.el7 base 565 k Transaction Summary ======================================================================================================================== Install 2 Packages (+3 Dependent packages) 后来发现这个版本事php 5.4,版本太老,不合用,于是不得不卸载之 SINCE THIS DEFAULT VERSION IS PHP5.4, WAY TOO OLD FOR MEDEAWIKI, I HAVE TO REMOVE THEM BY... yum erase php php-pdo php-cli php-common 正确的实践:参考网页[[https://www.tecmint.com/install-mediawiki-on-centos-7/]],升级yum并安装php7.3,修改MediaWiki的属性,修改php上传/下载文件容量的限制 =============================================================================== Install MediaWiki (Ref: https://www.tecmint.com/install-mediawiki-on-centos-7/) =============================================================================== yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum install epel-release yum install yum-utils yum-config-manager --enable remi-php73 yum install php php-pdo php-gd php-mbstring php-xml php-intl systemctl restart httpd chown -R apache:apache /var/www/html/mediawiki-1.33.0/ chown -R apache:apache /var/www/html/wiki chmod 755 /var/www/html/mediawiki-1.33.0/ chmod 755 /var/www/html/wiki/ =============================================================================== Edit /etc/php.ini: upload_max_filesize 100M (original=2M) 其实后来我又进一步改为500M post_max_size 128M (original=8M) 其实后来我又进一步改为500M ===== 3. Vim ===== 对编辑器 Vim 进行配置 add lines at the end of /etc/vimrc: ######################## "set encoding=utf-8 "set number set tabstop=2 "set expandtab set autoindent set encoding=UTF-8 to ensure Chinese input in vim set fileencoding=UTF-8 ######################## ===== 2. Anaconda ===== 首先从清华tuna下载anaconda安装包,并安装到/opt目录下 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh then install Anaconda3-5.3.1-Linux-x86_64.sh at /opt/anaconda3-3.5.1 磁盘容量因为安装anaconda而少了3.2G!!!真够大的! Before: Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 2.8G 35G 8% / After: Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 6.0G 32G 16% / 把‘conda init’代码段从 /root/.bashrc 复制到 /etc/bashrc 以便于所有用户都能正确加载 move 'conda init' code from /root/.bashrc to /etc/bashrc for ALL USERS like: #################################### # added by Anaconda3 5.3.1 installer # >>> conda init >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3-5.3.1/bin/conda' shell.bash hook 2> /dev/null)" if [ $? -eq 0 ]; then \eval "$__conda_setup" else if [ -f "/opt/anaconda3-5.3.1/etc/profile.d/conda.sh" ]; then . "/opt/anaconda3-5.3.1/etc/profile.d/conda.sh" CONDA_CHANGEPS1=true conda activate base else \export PATH="/opt/anaconda3-5.3.1/bin:$PATH" fi fi unset __conda_setup # <<< conda init <<< #################################### 最后生成一下conda已安装包的完整list,并删除安装包(以节省磁盘空间) generate a conda list in /opt/anaconda3-5.3.1/condalist-20190307 by 'conda list' remove the original installer file to save 638M disk space. ===== 1. Initial Installation ===== 最开始,干净的新系统一共占硬盘 1.8G 的容量。使用yum命令安装如下程序: yum update yum upgrade yum install gcc (already installed, actually do nothing) yum install gcc-c++ gcc-gfortran yum install ImageMagick yum install lftp yum install mc tree htop yum install bzip2 (for install anaconda.sh) yum install w3m yum install httpd vi /etc/httpd/conf/httpd.conf ---> 如果需要,改为 LISTEN 8000,我其实并未改 vi /etc/httpd/conf.d/userdir.conf ---> comment out "UserDir disabled"; uncomment "UserDir public_html" systemctl status httpd.service systemctl start httpd.service systemctl enable httpd.service systemctl restart httpd.service yum install netcdf nco ncl ncview grads ===== 0. History ===== 2019年3月,闻新宇在aliyun上购买了一个为期3年的云主机,然后购买并绑定在了pkumet.live域名上,该云主机2020年4月3日到期。出于安全和稳定的考虑,这台云主机运行CentOS 7(2019年9月已经释放了CentOS 8,未升级)。主机硬件参数如下: * 1 Processor * 1G RAM * 40G Hard drive * ~100KB/sec Upload/Download