建站第一天,记录下go+php+nginx+mysql的配置历程

in 杂谈心情运维 with 49 comments

最近尝试了一些小工具,又想要一个服务器来捣鼓了,遂使用Vultr注册了一个云主机,方便后续搞事情,在此记录下这次配置服务器环境的历程。

1、Golang

Golang安装是最简单的:
1.1、直接golang.orggolang.google.cn下载最新的tar包。

1.2、执行以下命令将压缩包解压并将go目录放置在/usr/local下

tar -C /usr/local -xzf go1.4.linux-amd64.tar.gz

1.3、再配置下Golang的运行环境如下

vim /etc/profile

1.4、在文件末尾增加,其中GOPATH为你自己的golang目录,我自己在/opt/go中,文件夹要包含src,pkg,bin三个目录

export PATH=$PATH:/usr/local/go/bin
export GOPATH=/opt/go
export GOBIN=$GOPATH/bin

1.5、至此,Golang已经全部配置完毕了,可以运行下看看go的运行环境

go env
至此用时2分钟,不得不说go的安装实在是方便

2、PHP7.3

PHP安装是最麻烦的,依赖环境多、编译时间久,

2.1、下载PHP安装包 php.net

2.2、解压缩安装包

tar zxf php-x.x.x

2.3、编译安装,这里涉及的环境比较多,我这里给出自己的编译配置,编译过程中会依次提示依赖包,需要自己一个一个yum安装

cd php-x.x.x
./configure --prefix=/usr/local/php  --with-config-file-path=/usr/local/php/etc --enable-fpm  --with-fpm-user=php-fpm  --with-fpm-group=php-fpm  --with-mysqli=mysqlnd --with-pdo-mysql  --with-libxml-dir  --with-gd  --with-jpeg-dir  --with-png-dir  --with-freetype-dir  --with-iconv-dir  --with-zlib-dir  --enable-soap --enable-mbstring  --enable-exif  --with-pear --enable-posix --enable-pcntl --with-curl  --with-openssl --disable-fileinfo
make && make install
cp php.ini-development /usr/local/php/php.ini

2.4、至此php安装完毕,在这里我顺带配置了php-fpm,以下是配置启动php-fpm的步骤

cp sapi/fpm/php-fpm/php-fpm.conf.default /usr/local/etc/php-fpm.conf
cp sapi/fpm/php-fpm /usr/local/bin
vim /usr/local/php/php.ini

2.5、设置cgi的配置,并设置php-fpm的用户和用户组,再运行php-fpm

cgi.fix_pathinfo=0
vim /usr/local/etc/php-fpm.conf
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = www-data
group = www-data
/usr/local/bin/php-fpm

各种依赖装得头疼,装个PHP用了一个小时。

3、Openresty
因为工作原因,有时候需要用Lua写一点HTTP服务的中间件,所以在这里我选用了openresty

3.1、安装起来比较方便,根据官方文档Openresty

sudo yum install yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
sudo yum install openresty
sudo yum install openresty-resty

4、Mysql5.6
4、1、这里我也偷了个懒,直接用yum install 安装了

yum -y install mysql.x86_64 mysql-server.x86_64 mysql-devel.x86_64
service mysqld start 

4、2、设置MySQLroot用户密码

mysql
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
Responses
  1. vardenafil online india

    Reply
  2. levitra generic over the counter valtrex furosemide 40 mg celebrex 100mg capsule cost avodart cost australia where can i buy clomid online best price for arimidex zoloft 50 mg amoxicillin 500 mg tablet can you buy ventolin over the counter in australia doxycycline 100 mg tablet diflucan 150 mg prednisone 7.5 mg daily prednisone 20 mg furosemide generic tadalafil 20mg coupon cost of brand metformin accutane generic generic lisinopril 5 mg vardenafil price comparison

    Reply
  3. sildenafil 100

    Reply
  4. buy celebrex online no prescription avodart capsule

    Reply
  5. buy tadalafil online no prescription doxycycline best price lisinopril 10 mg tablet buy vardenafil from india buy furosemide

    Reply
  6. furosemide 40 mg sildenafil for sale india lisinopril 30 order levitra professional buy valtrex online prednisone 4mg where to buy ventolin clomid pills cost of albuterol doxycycline 100mg capsules metformin best brand amoxicillin 500 mg buy cheap fluoxetine avodart 0.55 mg avodart 150 mg diflucan furosemide 20 mg price accutane 60 mg furosemide medication vardenafil over the counter

    Reply
  7. cost of celebrex in australia accutane 2019 furosemide 20 mg tablet brand name furosemide 20 mg price sildenafil 40 mg where to buy metformin 500 mg without a prescription order valtrex from canada diflucan pill doxycycline 50mg tablets doxycycline 500 mg capsules

    Reply
  8. The signs pointed out can show something is wrong regarding your procedure and you require to have your amount reexamined. These coincide symptoms that you might have when your body readjusts to the medication, so they only have to be mentioned when you understand you have actually taken additional of this medication compared Online Tadalafil Usto recommended. We currently dealt with this issue for you and are simply going to give you accessibility to all the details we handled to collect. Same top quality for less money - this certainly feels like an ideal way out for guys whose lives were impacted by impotence.

    Reply
  9. furosemide price

    Reply
  10. arimidex tablets 1mg albuterol 2.5 mg diflucan 300 mg doxycycline 100mg generic levitra 40 mg metformin rx buy celebrex online canada vardenafil generic sildenafil over the counter tadalafil online pharmacy

    Reply
  11. buy doxycycline online australia metformin brand name in india buy amoxicillin 500mg usa 10 mg fluoxetine levitra generic

    Reply
  12. vardenafil generic best online pharmacy generic levitra sildenafil buy online usa where to buy diflucan over the counter furosemide pill

    Reply
  13. tadalafil from canada to usa ought to be taken when required, but you need to avoid using it a lot more typically compared to every 24 hrs. More people find it hassle-free, and they do not mind the reality universal medicines are available online. Particular mild side impacts you can experience when taking Tadalafil include facial flushing, joint pain, acid indigestion, headache and queasiness.

    Reply
  14. buy celebrex buy sildenafil prednisone 20 mg doxycycline 100mg tadalafil 20mg india

    Reply
  15. best price for arimidex

    Reply
  16. There is no have to stress if throughout the treatment regarding Tadalafil you get acid indigestion or pyrosis ( heartburn ), problem, flushing, cough, muscular tissue discomfort, looseness of the bowels, or pain in the belly, as those are light negative effects that do not have to be mentioned. This side impact is most often reported by people with pre-existing eye issues, those older than 50, detected regarding diabetic issues, high cholesterol levels, heart condition or high blood stress. Tadalafil is an erectile dysfunction procedure medicine that functions by raising the blood flow to the penis. We could provide you an unique possibility to acquire dependable Tadalafil from a relied on drug store, and you are the one that is going to choose that drug store. Take Tadalafil frequently regarding some food or without. Eating grapefruit and drinking grapefruit juice is not advised as interference with tadalafil is likewise possible. Of the energetic ingredient.

    Reply
  17. sildenafil 20 mg online pharmacy buy sildenafil where can i buy arimidex albendazole drug buy celebrex canadian pharmacy cheap generic levitra india zoloft 100mg price in india buy lisinopril

    Reply
  18. vardenafil generic diflucan cost avodart .5 mg buy doxycycline online buy diflucan prednisone 20 mg generic price of zoloft without insurance furosemide 40 mg albendazole 400 mg tablets price paypal buy valtrex online canada

    Reply
  19. generic prednisone

    Reply
  20. sildenafil 50

    Reply
  21. tadalafil soft tablets 20mg (Cialis) is a remedy strongly efficient in managing the signs of impotence (male impotence). Same top quality for less money - this certainly feels like an ideal way out for guys whose lives were impacted by impotence. Unless otherwise advised by your health and wellness treatment supplier, take one tablet computer of Tadalafil half an hour prior to making love with or xerophagy. Your physician is supposed to know your full case history before prescribing this medicine.

    Reply
  22. albuterol albendazole drug oral doxycycline diflucan 150 mg lisinopril sale fluoxetine 40 mg tablets amoxicillin 30 capsules price buy ventolin online

    Reply
  23. diflucan 150 mg tablet lisinopril 10 mg tablet lisinopril 20 mg cost buy celebrex price of metformin 850 mg

    Reply
  24. arimidex men accutane 40mg avodart canada pharmacy

    Reply
  25. amoxicillin 500 mg

    Reply
  26. The complying with symptoms may show you have overdosed: heartburn, acid indigestion, runny or stuffy nose, priapism (lengthened and painful construction), flushing, discomfort in the back or in the muscular tissues and a few other. Since the quantity is additionally the same, you could pay less for universal tadalafil 5mg generic and be sure it will offer you the same reaction. It could brought about the long-lasting damages on the penis cells and render the person even a lot more impotent than before.

    Reply
  27. diflucan cream lisinopril 10 12.5 mg

    Reply
  28. sildenafil citrate india where to get albuterol buy cheap lisinopril vardenafil 20 mg buy tadalafil 20mg furosemide 125mg

    Reply
  29. You will certainly need to educate your doctor of any kind of clinical problems you have that can interfere with your procedure and could call for an amount change, such as chest pain, renal system, heart, or liver disease, eye disease, severe eyesight loss, angulation, irregular heartbeat, a movement, red blood cell issues, cavernosal fibrosis, Peyronie's condition, a cardiac arrest, bleeding disorder, diabetes, lesions, higher or low blood tension, high cholesterol, and any sort of other ones you believe are very important to state. You need to not be worried of the word 'universal', due to the fact that every person knows those are equally as protected and reliable, as long as you obtain them from a reputable pharmacy that deserves your rely on. If your neck or jaw could indicate severe impacts of Tadalafil and really need to be mentioned instantly to your physician, such signs as breast pain and tingling or tingling. Tadalafil (Cialis) is a phosphodiesterase (PDE) inhibitor that works to deal with impotence by boosting the blood flow to the cells of the penis. , if you are making use of any of these medicines taking where to buy generic tadalafil without previously discussing this choice with your wellness treatment provider is not recommended..

    Reply
  30. albuterol 60

    Reply
  31. doxycycline 100mg canada furosemide 40 mg pill buy celebrex how much is furosemide 40 mg buy lisinopril online canada

    Reply
  32. furosemide 40 mg sildenafil 50 mg coupon vardenafil professional accutane 30 mg albuterol prescription cheap levitra pills avodart price usa albendazole coupon lisinopril 30 generic diflucan 150 mg

    Reply
  33. Your physician will additionally really need to understand if you are presently making use of terazosin, tamsulosin, antidepressants, rifabutin, tadalafil canada priceseizure medicines, verapamil, doxazosin, dalfopristin, nicardipine, itraconazole, barbiturates, erythromycin, diltiazem, miconazole, rifampin, prazosin, voriconazole, HIV or AIDS drugs, quinidine, rifapentine, ketoconazole or clarithromycin.

    Reply
  34. can you buy diflucan otc

    Reply
  35. ventolin 100mcg price avodart brand name furosemide 20 mg vardenafil buy order albendazole

    Reply
  36. avodart capsules levitra generic ventolin inhaler salbutamol buy diflucan cheap prednisone 10mg cost amoxicillin 500mg buy doxycycline online usa

    Reply
  37. albendazole sale can you buy doxycycline over the counter usa order sildenafil online purchase generic levitra furosemide brand

    Reply
  38. prednisone pills avodart buy lisinopril can i buy ventolin online

    Reply
  39. avodart generic equivalent sildenafil 20 mg buy ventolin in mexico zoloft over the counter sildenafil canada price vardenafil best price lisinopril 40 valtrex 1000 mg albuterol rx price avodart generic

    Reply
  40. generic sildenafil tablets celebrex brand name price diflucan 6 ventolin hfa valtrex 1g albendazole mexico buy cheap sildenafil online uk clomid otc albuterol buying lisinopril generic cost avodart medication generic furosemide 20 mg tablet fluoxetine 20 mg price prednisone cost buy doxycycline online vardenafil 20mg for sale generic levitra online usa doxycycline 100mg avodart uk prescription arimidex brand name

    Reply
  41. mail order prednisone

    Reply
  42. You require to state all the wellness conditions you have or used to have as they could possibly interfere with your therapy making it less favorable. Several of the negative effects you may experience are normally mild and can consist of headache, heartburn, upset stomach, looseness of the bowels and face flushing. Naturally, you should never integrate it with nicardipine, quinidine, antidepressants, rifapentine, miconazole, verapamil, rifabutin, clarithromycin, itraconazole, seizure medicines, tamsulosin, diltiazem, erythromycin, prazosin, rifampin, doxazosin, dalfopristin, voriconazole, ketoconazole, terazosin, barbiturates, in addition to HIV or AIDS drugs before you have spoken to your medical professional. Review your health and wellness condition with your medical professional as several of the wellness issues you have or made use of to have could avoid you from securely taking tadalafil tablets price in india. Nevertheless, an erection will not happen without prior sexual stimulation. You rate to contrast the very best pharmacies we chose for you and obtain your Tadalafil on the majority of advantageous terms with fast shipment.

    Reply
  43. generic prednisone where to buy celebrex cheap ventolin coupon diflucan 125mg diflucan tablet

    Reply
  44. furosemide 20 mg where to get accutane sildenafil buy how much is clomid avodart price

    Reply
  45. tadalafil 5mg online side effects are often moderate and feature flushing, lightheadedness, muscle discomfort, nasal stodginess, hassle, indigestion, discomfort in legs or arms, back discomfort, and vision changes. Both these elements will stop you from securely taking Tadalafil. Make certain your doctor knows if you have physical defect of the penis, heart rhythm problems, angina, red blood cell disorder, low or higher blood tension, heart problem, a recent history a cardiovascular disease, stroke or coronary infarction, tummy ulcer, renal system condition, liver condition, or bleeding ailment, or you may require an amount modification. You have to never share your medication with other individuals that do not have a prescribed. It works by enabling even more blood to get in the penis leading to a stronger and more steady erection enough to finish sex-related sex.

    Reply
  46. lisinopril 100 mg avodart 0.5 mg soft capsules accutane generic cheap tadalafil tablets fluoxetine from canada furosemide pill sildenafil 50mg buy metformin rx

    Reply
  47. where to buy cheap clomid online doxycycline 100mg how to buy sildenafil

    Reply
  48. arimidex weight loss furosemide 20 mg tablet prednisone 100 mg sildenafil 150 mg where to get diflucan over the counter 80 mg accutane doxycycline 100mg tablets where can i buy levitra online 40mg fluoxetine lasix vs furosemide

    Reply
  49. furosemide pill furosemide 20 mg zoloft 50 mg generic clomid over the counter metformin 500 mg tablet price in india avodart generic albuterol 90 mcg sildenafil 20 mg buy lisinopril uk generic vardenafil canada

    Reply