快轉到主要內容

Fedora WEB开发环境安装配置

439 字1 分鐘00
作者Y Cheung
目錄

環境版本#

操作步驟#

关闭SELinux#

sudo vi /etc/sysconfig/selinux ,更改 SELINUX=disabled

升级包管理工具#

1sudo dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate

配置源,开启缓存#

修改配置文件,添加以下行,配置使用 dnf 最快源,开启缓存。

1# /etc/dnf/dnf.conf
2fastestmirror=true
3keepcache=true

(参考:DNF Configuration Reference)

安装chromium#

1sudo dnf install chromium

生成SSH KEY#

生成SSH KEY并添加至各服务 (Github/coding.net/ …)

1$ssh-keygen -t rsa -b 4096 -C "[email protected]"
2$clip < ~/.ssh/id_rsa.pub

(参考:[Generating an SSH key](https://docs.github.com/articles/generating-an-ssh-key/))

安装编辑器#

安装Nginx#

1sudo dnf install nginx
2sudo service nginx start
3firewall-cmd --permanent --add-service=http
4firewall-cmd --permanent --add-service=https
5systemctl reload firewalld

安装MariaDB#

1sudo dnf install mariadb-server
2sudo service mariadb start
3mysql_secure_installation

安装PHP和PHP-FPM#

1sudo dnf install php php-commom php-fpm php-mysql php-gd

在www.conf文件中做以下配置

1# /etc/php-fpm.d/www.conf
2user = nginx 
3group = nginx

重啟服務

1sudo service php-fpm restart
2sudo service nginx restart

安装composer#

1$php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
2$php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
3$php composer-setup.php
4$php -r "unlink('composer-setup.php');"
5$sudo mv composer.phar /usr/local/bin/composer
分享

相關文章

Drupal7中自定义表格输入

作者 Y Cheung1240 字3 分鐘00

Drupal默认的节点表单(entity form)输入有时候并不能满足我们的需求,比如我想做一个类似excel表格输入形式的表单呢? = DEMO点这里 (PS. 用 …

Aliyun MySQL Aborting

作者 Y Cheung331 字1 分鐘00

放了wordpress的主機最近經常掛掉,提示無法連結數據庫,檢查log信息發現是因為內存不足,把InnoDB的buffer pool size改小後似乎好了一些,可今天還是出錯了 …

Highslide Image WP插件完成

作者 Y Cheung237 字1 分鐘00

Y Cheung的玩樂博客要搬家啦,用了N多年的插件原作者一直不更新,嗚嗚嗚,只好自己重新寫一個喇! Highslide Image - Wordpress插件 我的思路是: 編輯 …

DokuWiki 安装及使用

作者 Y Cheung609 字2 分鐘00

最近搭建了一个私密wiki用来管理知识碎片及资料等,Y.Cheung 选择了DokuWiki这款开源wiki引擎。 DokuWiki优点: 轻便、简洁、可扩展性强 免数据库 …

↑