Instalação do Apache, PHP e MySQL (MariaDB) no CentOS 7

Antes de fazer qualquer coisa, verifique se o sistema está atualizado:

# yum check-update
# yum update

Agora, para instalar o Apache, o PHP e o MySQL (MariaDB) no CentOS 7, siga os passos abaixo.

1) Instalação do MySQL (MariaDB):

Depois que o sistema estiver atualizado, como root, instale o MySQL (MariaDB):

# yum -y install mariadb-server mariadb

O CentOS instalará o MySQL (MariaDB) e quaisquer dependências. Depois disso, inicie o banco de dados e habilite a inicialização automática durante o boot do host:

# systemctl enable mariadb.service
# systemctl start mariadb.service

O próximo passo é rodar a rotina de configuração de segurança do MySQL, que “tranca” a instalação para evitar acessos não autorizados (em vermelho negrito estão os comandos a serem digitados durante a execução do comando):

# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password: (digite a senha aqui)
Re-enter new password: (repita a senha aqui)
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

2) Instalação do Apache:

Como root, instale o Apache:

# yum -y install httpd httpd-manual httpd-tools

O CentOS instalará o Apache e as dependências. Depois disso habilite o Apache para inicialização automática e inicie o daemon:

# systemctl enable httpd.service
# systemctl start httpd.service

Se nenhuma mensagem de erro for exibida, o Apache foi instalado corretamente. Agora é necessário configurar o firewall do CentOS para permitir acesso às portas 80 e 443:

# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload

Nesse momento você pode abrir o endereço http://<ip do servidor> para verificar se a página de teste do Apache é exibida corretamente (lembre-se que o firewall corporativo, além do firewall do próprio host onde o Apache está instalado, também tem que ser configurado para permitir o acesso):

Página de teste do Apache

 3) Instalação do PHP:

A instalação básica do PHP é muito simples:

# yum -y install php

O comando acima instalará o PHP 5.4 no CentOS e as dependências. Precisamos instalar mais alguns módulos importantes para o PHP (dependendo de sua aplicação web, outros módulos não listados aqui também podem ser necessários):

# yum -y install php-gd php-mysql php-odbc php-pear php-recode php-xml

Para fazer com que o Apache utilize PHP, basta reiniciá-lo:

# systemctl restart httpd.service

O teste mais básico para verificar se o PHP está instalado e corretamente configurado com o Apache é criar o arquivo /var/www/html/info.php com o seguinte conteúdo:

<?php
phpinfo();
?>

Abra o endereço http://<ip do servidor>/info.php e verifique se as informações do PHP são exibidas corretamente:

Informações do PHP

Por motivos de segurança o arquivo /var/www/html/info.php deve ser excluído após o teste.

1,032 thoughts on “Instalação do Apache, PHP e MySQL (MariaDB) no CentOS 7”

  1. Pingback: adam eve deal
  2. Pingback: tmb license lookup
  3. Pingback: porn movie
  4. Pingback: porn movie
  5. Pingback: Premio a la mujer
  6. Pingback: hack email account
  7. Pingback: piala dunia 2018
  8. Pingback: هایک ویژن
  9. Pingback: suterh
  10. Pingback: 100% kona coffee
  11. Pingback: geodesic dome tent
  12. Pingback: Cloud Archiving
  13. Pingback: mobile apps
  14. Pingback: adam and eve
  15. Pingback: best kona coffee
  16. Pingback: lion coffee
  17. Pingback: ben wa balls
  18. Pingback: realistic fun vibe
  19. Pingback: giving a blow job
  20. Pingback: mini massage wand
  21. Pingback: adidas鞋子
  22. Pingback: finger vibrator
  23. Pingback: کفسابی
  24. Pingback: Buy Vigra
  25. Pingback: com meu bebe
  26. Pingback: web hosting
  27. Pingback: butt plug
  28. Pingback: lace lingerie
  29. Pingback: tinglers plug
  30. Pingback: کفسابی
  31. Pingback: 6 inch dong
  32. Pingback: dildo strapon
  33. Pingback: cosmo vibrator
  34. Pingback: kona coffee
  35. Pingback: يوبيت
  36. Pingback: cock ring
  37. Pingback: seo marketing
  38. Pingback: corrugated plastic
  39. Pingback: wild orchid sex
  40. Pingback: best sex toys
  41. Pingback: adult toy catalog
  42. Pingback: adm eve online
  43. Pingback: 10 best sex toys
  44. Pingback: masturbator lube
  45. Pingback: best dildo to get
  46. Pingback: RMUTT Thailand
  47. Pingback: هایک ویژن
  48. Pingback: bondage paddle
  49. Pingback: sex toy review
  50. Pingback: SEO 2018
  51. Pingback: car accident
  52. Pingback: huge dildos
  53. Pingback: gold necklace
  54. Pingback: any number
  55. Pingback: peak wand vibrator
  56. Pingback: sex movie
  57. Pingback: leather strap on
  58. Pingback: sex toy review
  59. Pingback: mp3 song
  60. Pingback: Broke phone
  61. Pingback: buy womanizer toy
  62. Pingback: Black Dildo
  63. Pingback: keriomaker
  64. Pingback: خرید vpn
  65. Pingback: خرید کریو
  66. Pingback: sex doll for him
  67. Pingback: خرید kerio
  68. Pingback: beginner strap on
  69. Pingback: خرید کریو
  70. Pingback: clitoris
  71. Pingback: clinic
  72. Pingback: harmonica app
  73. Pingback: Powerful vibrator
  74. Pingback: Hot Tube
  75. Pingback: mumbai police
  76. Pingback: خرید هاست
  77. Pingback: 美容外科
  78. Pingback: نماشویی
  79. Pingback: Resources
  80. Pingback: singapore airlines
  81. Pingback: Panjab Police
  82. Pingback: 80's hits
  83. Pingback: sex video
  84. Pingback: Buy Dresses Online
  85. Pingback: اپل ایدی
  86. Pingback: خرید vpn
  87. Pingback: خرید vpn
  88. Pingback: pure kona coffee
  89. Pingback: Kona Cof
  90. Pingback: خرید vpn
  91. Pingback: 100% Ko coffee
  92. Pingback: persian setar
  93. Pingback: خرید vpn
  94. Pingback: find this
  95. Pingback: vegas strip
  96. Pingback: سئو
  97. Pingback: coffee beans
  98. Pingback: 100 kona coffee
  99. Pingback: خرید vpn
  100. Pingback: coffee
  101. Pingback: نصب آنتن
  102. Pingback: خرید vpn
  103. Pingback: خرید vpn
  104. Pingback: خرید کریو
  105. Pingback: خرید vpn
  106. Pingback: next
  107. Pingback: خرید vpn
  108. Pingback: raman kathpalia
  109. Pingback: خرید vpn
  110. Pingback: tam
  111. Pingback: خرید vpn
  112. Pingback: Rbx exchange
  113. Pingback: termeh
  114. Pingback: خرید vpn
  115. Pingback: managed hosting
  116. Pingback: خرید vpn
  117. Pingback: گوگل adwords
  118. Pingback: گوگل adwords
  119. Pingback: Belize motels
  120. Pingback: گوگل adwords
  121. Pingback: 脱毛
  122. Pingback: vpn
  123. Pingback: گوگل adwords
  124. Pingback: mauritius
  125. Pingback: nebbia leginy
  126. Pingback: persian tar
  127. Pingback: resume builder
  128. Pingback: گوگل adwords
  129. Pingback: خرید vpn
  130. Pingback: خرید vpn
  131. Pingback: خرید vpn
  132. Pingback: سیستم cctv
  133. Pingback: فروش طلا
  134. Pingback: love tips
  135. Pingback: سیستم cctv
  136. Pingback: Samsung wholesale
  137. Pingback: خرید طلا
  138. Pingback: سیستم cctv
  139. Pingback: خرید vpn
  140. Pingback: gratis inserate
  141. Pingback: خرید vpn
  142. Pingback: prostate orgasm
  143. Pingback: nipple fetish
  144. Pingback: سیستم cctv
  145. Pingback: خرید vpn
  146. Pingback: drivers hp
  147. Pingback: rotating vibrator
  148. Pingback: sex toys orgasm
  149. Pingback: خرید vpn
  150. Pingback: خرید طلا
  151. Pingback: clit sex
  152. Pingback: intense vibrator
  153. Pingback: towel
  154. Pingback: health
  155. Pingback: credit report
  156. Pingback: خرید طلا
  157. Pingback: thrusting vibrator
  158. Pingback: penis toys
  159. Pingback: mega dildo
  160. Pingback: خرید طلا
  161. Pingback: cock rings
  162. Pingback: خرید vpn
  163. Pingback: خرید طلا
  164. Pingback: سیستم cctv
  165. Pingback: huge dildos
  166. Pingback: dil do
  167. Pingback: ingyen tanfolyamok
  168. Pingback: look here
  169. Pingback: Arabic hoodies
  170. Pingback: glass sex toy
  171. Pingback: clit vacume
  172. Pingback: dildo review
  173. Pingback: pegging
  174. Pingback: water based lube
  175. Pingback: خرید طلا
  176. Pingback: squrting dildo
  177. Pingback: hydroquinone
  178. Pingback: uberlube anal
  179. Pingback: palladium material
  180. Pingback: سیستم cctv
  181. Pingback: sex toys for men
  182. Pingback: organic herb
  183. Pingback: framingham movers
  184. Pingback: flexible dildo
  185. Pingback: bahis siteleri
  186. Pingback: kona coffee beans
  187. Pingback: miniclip
  188. Pingback: miniclip games
  189. Pingback: bahis siteleri
  190. Pingback: air swimmers shark
  191. Pingback: bet online
  192. Pingback: bahis siteleri
  193. Pingback: bahis siteleri
  194. Pingback: bahis siteleri
  195. Pingback: bahis siteleri
  196. Pingback: bahis siteleri
  197. Pingback: bahis siteleri
  198. Pingback: goldenbah's
  199. Pingback: spreader bar
  200. Pingback: push clitoris
  201. Pingback: clitorus gel
  202. Pingback: apartamenti varna
  203. Pingback: Free php scriptp
  204. Pingback: Rödspätta
  205. Pingback: wife pegging
  206. Pingback: adam and eve dildo
  207. Pingback: solgar
  208. Pingback: Democracy
  209. Pingback: video maza zone
  210. Pingback: Compras Online
  211. Pingback: matka result
  212. Pingback: jageze
  213. Pingback: dating direct
  214. Pingback: Get free backlinks
  215. Pingback: cash
  216. Pingback: Equipment
  217. Pingback: Nostril
  218. Pingback: garudapoker
  219. Pingback: Electronic Repairs
  220. Pingback: youthfulforever
  221. Pingback: powh3d
  222. Pingback: Instagram unfollow
  223. Pingback: psychic
  224. Pingback: Las Vegas Escorts
  225. Pingback: alpinemining
  226. Pingback: gps tracker
  227. Pingback: tile removal
  228. Pingback: eliphas spell
  229. Pingback: slovari
  230. Pingback: clip converter
  231. Pingback: beginner sex toys
  232. Pingback: mi guia ceneval
  233. Pingback: golf store
  234. Pingback: prayer
  235. Pingback: brazilian hair
  236. Pingback: remy hair
  237. Pingback: sex toy review
  238. Pingback: patriots pursuit
  239. Pingback: Indian hair
  240. Pingback: eve sex toys shop
  241. Pingback: mens fashion-wear
  242. Pingback: malaysian hair
  243. Pingback: better health ways
  244. Pingback: Trading
  245. Pingback: Best Bullet Vibe
  246. Pingback: zastolnie pesni
  247. Pingback: light novel
  248. Pingback: clit vibrator
  249. Pingback: suction cup dildo
  250. Pingback: vse prazdniki
  251. Pingback: cricket tips
  252. Pingback: vidosy
  253. Pingback: pochinki t shirt
  254. Pingback: jesus movie
  255. Pingback: Hydroquinone
  256. Pingback: Hydroquinone
  257. Pingback: sportotobet
  258. Pingback: Sittercity login
  259. Pingback: خرید vpn
  260. Pingback: mermaid videos
  261. Pingback: satisfyer
  262. Pingback: huge dildo review
  263. Pingback: برش لیزر
  264. Pingback: web
  265. Pingback: HEART
  266. Pingback: threesome sex toys
  267. Pingback: News
  268. Pingback: prazdniki rossii
  269. Pingback: trah_net_621
  270. Pingback: anal training kit
  271. Pingback: strap on sex toy
  272. Pingback: Fight With Deny
  273. Pingback: Sex Toy Haul
  274. Pingback: vibrator
  275. Pingback: super pump
  276. Pingback: clit vibrator
  277. Pingback: Dildo
  278. Pingback: hd film izle
  279. Pingback: prostate toy
  280. Pingback: adult sex toys
  281. Pingback: Wet Rabbit
  282. Pingback: free pussy finder
  283. Pingback: spanking
  284. Pingback: male masturbator
  285. Pingback: Vibrator
  286. Pingback: clit vibrator
  287. Pingback: fitness trends
  288. Pingback: soccer prediction
  289. Pingback: vibrating panty
  290. Pingback: 2 fevralya 8671
  291. Pingback: DraftKings NBA
  292. Pingback: g spot stimulation
  293. Pingback: Tire Pressure
  294. Pingback: friv
  295. Pingback: drivers free
  296. Pingback: Super gadgets
  297. Pingback: Painters Brisbane
  298. Pingback: NBA DFS
  299. Pingback: College Basketball
  300. Pingback: the bunny sex toy
  301. Pingback: DraftKings NBA
  302. Pingback: سكس
  303. Pingback: quizhow
  304. Pingback: Sexycams
  305. Pingback: aflamsex
  306. Pingback: Cryto curency
  307. Pingback: rottweiler
  308. Pingback: Xxx live sexy cams
  309. Pingback: Sex live
  310. Pingback: Hip hop leaks
  311. Pingback: radio kabul testo
  312. Pingback: Car lockout
  313. Pingback: more on the page
  314. Pingback: Livesexgirls
  315. Pingback: Freexxx
  316. Pingback: Shemale cams
  317. Pingback: Porn videos
  318. Pingback: Hot babes
  319. Pingback: Iphone deal
  320. Pingback: Cheap iphone case
  321. Pingback: lelo sex toys
  322. Pingback: Iphone protector
  323. Pingback: سكس
  324. Pingback: سكس مترجم
  325. Pingback: mind blowing sex
  326. Pingback: sex finger
  327. Pingback: dildo set
  328. Pingback: best vibraters
  329. Pingback: butt plug sex
  330. Pingback: سكس
  331. Pingback: Free MILF Porn
  332. Pingback: سكس مترجم
  333. Pingback: DFS
  334. Pingback: ireland
  335. Pingback: Dr Kassabian
  336. Pingback: ny apartments
  337. Pingback: criminal lawyer
  338. Pingback: summer camp china
  339. Pingback: prazdnik
  340. Pingback: hacker a pagamento
  341. Pingback: best ben wa balls
  342. Pingback: lesbian vibrator
  343. Pingback: mp3 songs
  344. Pingback: dogs cages
  345. Pingback: aflampornhd
  346. Pingback: adult seo
  347. Pingback: female vibrators
  348. Pingback: click to read more
  349. Pingback: go to the source
  350. Pingback: check this out
  351. Pingback: here
  352. Pingback: go to the page
  353. Pingback: dog drawing
  354. Pingback: source
  355. Pingback: on this page
  356. Pingback: go
  357. Pingback: how to use lube
  358. Pingback: sex confession
  359. Pingback: girls masturbating
  360. Pingback: hip hop dj
  361. Pingback: home inspections
  362. Pingback: Luxury Vibrator
  363. Pingback: Anal Dildo
  364. Pingback: Anal Vibrator
  365. Pingback: Pure Wand Massager
  366. Pingback: Rabbit Vibrator
  367. Pingback: Best Anal Lube
  368. Pingback: nipple clippers
  369. Pingback: poker 88
  370. Pingback: glass dildo
  371. Pingback: Sex Toy Tutorial
  372. Pingback: MILF Porn
  373. Pingback: mp3juices
  374. Pingback: tubidy mp3
  375. Pingback: dildo review video
  376. Pingback: clit vibrator
  377. Pingback: ebooks for resale
  378. Pingback: sirius xm gift
  379. Pingback: butterfly sex toy
  380. Pingback: adam eve discount
  381. Pingback: istorii
  382. Pingback: اسکوتر
  383. Pingback: iPhone 7 Cable
  384. Pingback: Lenovo
  385. Pingback: together traveling
  386. Pingback: golfing equipment
  387. Pingback: best blowjob
  388. Pingback: laptop app
  389. Pingback: click here
  390. Pingback: notehub.org
  391. Pingback: i provide a link
  392. Pingback: مه پاش
  393. Pingback: پمپ مه پاش
  394. Pingback: more info
  395. Pingback: link to the page
  396. Pingback: notehub.org
  397. Pingback: spreader bar
  398. Pingback: notehub.org
  399. Pingback: source
  400. Pingback: praznikov kalendar
  401. Pingback: notehub.org go
  402. Pingback: notehub.org
  403. Pingback: yoni masseur paris
  404. Pingback: سئو سایت
  405. Pingback: security guard
  406. Pingback: rabbit sex toy
  407. Pingback: auto taxi
  408. Pingback: vibrator unboxing
  409. Pingback: vibrator for women
  410. Pingback: interracial porn
  411. Pingback: Freemason
  412. Pingback: häst
  413. Pingback: Stones
  414. Pingback: the accomodator
  415. Pingback: The Swan Wand
  416. Pingback: Max Results Pump
  417. Pingback: Anal Toy Review
  418. Pingback: testi canzoni
  419. Pingback: iphone Wholesale
  420. Pingback: notehub.org
  421. Pingback: notehub.org
  422. Pingback: notehub.org
  423. Pingback: notehub.org
  424. Pingback: online free course
  425. Pingback: Dominatrix Toys
  426. Pingback: Big Dildo
  427. Pingback: Ben Wa Balls
  428. Pingback: سكس
  429. Pingback: notehub.org here
  430. Pingback: برامج نت
  431. Pingback: mp3 music download
  432. Pingback: kegel exercises
  433. Pingback: best cock sleeve
  434. Pingback: giant dildo review
  435. Pingback: review kingcock
  436. Pingback: xlxx
  437. Pingback: rent a server
  438. Pingback: 100% kona coffee
  439. Pingback: سكس
  440. Pingback: atlanta bail bond
  441. Pingback: Buy kona coffee
  442. Pingback: we buy junk cars
  443. Pingback: escape room athens
  444. Pingback: horses
  445. Pingback: Abraaj
  446. Pingback: hummer hoverboard
  447. Pingback: hosting
  448. Pingback: 100% kona coffee
  449. Pingback: ninebot
  450. Pingback: phenq ingredients
  451. Pingback: free app for pc
  452. Pingback: iptv admin panel
  453. Pingback: Biz Carlton
  454. Pingback: seo service
  455. Pingback: Managed Services
  456. Pingback: free phone cases
  457. Pingback: 8185996628

Leave a Reply