一. ubuntu虚拟机的安装
这里采用的是Vmware16PRO虚拟机
Ubuntu 版本为Ubuntu18.04.5
提示:本人先安装了一个64位14.04.6,不知道为何apt-get命令为什么不能解析网站,能上网。后来解决不了就换了一个版本。
二、安装apache2
1.使用步骤
安装apache2,下的慢就去搜ubuntu换源教程:
sudo apt-get install apache2
打开目录并且,备份一下。
sudo cp apache2.conf apache2.conf.bak
编辑apache2.conf
sudo gedit apache2.conf
把配置文件apache2.conf中“<Directory /var/www/>”这一部分的内容改成下边的样子
<Directory /var/www/>
Options Indexes FollowSymLinks
Require all granted
AllowOverride Options Indexes FileInfo Limit
AddType application/xhtml+xml .xhtml
AddType font/ttf .ttf
# For CGI support
AddHandler cgi-script .cgi
# Comment out the line above and uncomment the line below for FastCGI
#AddHandler fastcgi-script fcgi
</Directory>
ServerName localhost
启动apache服务
sudo service apache2 restart
2.查看ip
安装网络工具模块
sudo apt install net-tools
查看ip
ifconfig
如下图所示:ip地址192.168.151.130为虚拟机地址
3.验证安装成果
如果安装成功,则可以在虚拟机里通过http://192.168.151.130或http://localhost访问apache默认页,也可以在windows输入http://192.168.151.130访问,如下图所示就成功了。
三、安装并配置BRAT
步骤1 下载BRAT1.3
步骤2 将软件安装包复制到apache根目录,解压,修改文件名为brat
cd /var/www/html
sudo cp /media/sf_Downloads/brat-v1.3_Crunchy_Frog.tar.gz /var/www/html/
sudo tar -xvzf brat-v1.3_Crunchy_Frog.tar.gz
sudo mv brat-v1.3_Crunchy_Frog brat
步骤3 给brat分配权限
sudo chmod 777 -R /var/www/html/brat
步骤4 进入brat目录,并启动安装脚本,输入用户名、密码以及邮箱地址。一会登陆你要用,相当于注册。
cd /var/www/html/brat
sudo ./install.sh
*Please the user name that you want to use when logging into brat*
editor
*Please enter a brat password (this shows on screen)*
annotate
*Please enter the administrator contact email*
admin@example.com
步骤5 下载python2(python3不适用)
sudo apt install python
步骤6 启动brat
cd /var/www/html/brat
python standalone.py
步骤7 用谷歌浏览器打开http://127.0.0.1:8001
四、总结
完活